537 // the resource area. |
537 // the resource area. |
538 |
538 |
539 #define NEW_RESOURCE_ARRAY(type, size)\ |
539 #define NEW_RESOURCE_ARRAY(type, size)\ |
540 (type*) resource_allocate_bytes((size) * sizeof(type)) |
540 (type*) resource_allocate_bytes((size) * sizeof(type)) |
541 |
541 |
|
542 #define NEW_RESOURCE_ARRAY_RETURN_NULL(type, size)\ |
|
543 (type*) resource_allocate_bytes((size) * sizeof(type), AllocFailStrategy::RETURN_NULL) |
|
544 |
542 #define NEW_RESOURCE_ARRAY_IN_THREAD(thread, type, size)\ |
545 #define NEW_RESOURCE_ARRAY_IN_THREAD(thread, type, size)\ |
543 (type*) resource_allocate_bytes(thread, (size) * sizeof(type)) |
546 (type*) resource_allocate_bytes(thread, (size) * sizeof(type)) |
544 |
547 |
545 #define REALLOC_RESOURCE_ARRAY(type, old, old_size, new_size)\ |
548 #define REALLOC_RESOURCE_ARRAY(type, old, old_size, new_size)\ |
546 (type*) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(type), (new_size) * sizeof(type) ) |
549 (type*) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(type), (new_size) * sizeof(type) ) |