core/heap.c
/* Caller is required to handle thread synchronization and to update dynamo vm areas.
 * size must be PAGE_SIZE-aligned.
 * Returns NULL if fails to allocate memory!
 */
Caller is required to handle thread synchronization and to update dynamo vm areas.
size must be PAGE_SIZE-aligned.
Returns NULL if fails to allocate memory!
Caller is required to handle thread synchronization and to update dynamo vm areas . size must be PAGE_SIZE - aligned . Returns NULL if fails to allocate memory!
static void *
vmm_heap_alloc(size_t size, uint prot, heap_error_code_t *error_code)
{
    vm_addr_t p = vmm_heap_reserve(size, error_code, TEST(MEMPROT_EXEC, prot));
    if (!p)
        return NULL;               
    if (!vmm_heap_commit(p, size, prot, error_code))
        return NULL;               
    return p;
}
static void * vmm_heap_alloc ( size_t size , uint prot , heap_error_code_t * error_code ) { vm_addr_t p = vmm_heap_reserve ( size , error_code , TEST ( MEMPROT_EXEC , prot ) ) ; if ( ! p ) return NULL ; if ( ! vmm_heap_commit ( p , size , prot , error_code ) ) return NULL ; return p ; }
Caller is required to handle thread synchronization and to update dynamo vm areas.
Caller is required to handle thread synchronization and to update dynamo vm areas .
/* out of reserved memory */ /* out of committed memory */