system/kernel: add missing posix_memalign, fixes guarded_heap
Change-Id: Id035aa607a5a2a8545a85416d97cdd4a1b069203 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8369 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
7b1d348567
commit
909ef790b1
@@ -944,6 +944,17 @@ memalign_etc(size_t alignment, size_t size, uint32 flags)
|
||||
}
|
||||
|
||||
|
||||
extern "C" int
|
||||
posix_memalign(void** _pointer, size_t alignment, size_t size)
|
||||
{
|
||||
if ((alignment & (sizeof(void*) - 1)) != 0 || _pointer == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
*_pointer = guarded_heap_allocate(sGuardedHeap, size, alignment, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
free_etc(void *address, uint32 flags)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user