Lines Matching refs:size

87 //   NEW_RESOURCE_ARRAY(type,size)
89 // NEW_C_HEAP_ARRAY(type,size)
91 // char* AllocateHeap(size_t size, const char* name);
184 _NOINLINE_ void* operator new(size_t size, address caller_pc = 0);
185 _NOINLINE_ void* operator new (size_t size, const std::nothrow_t& nothrow_constant,
196 void* operator new(size_t size);
220 void* operator new(size_t size);
242 void* operator new(size_t size, AllocFailType alloc_failmode, size_t length);
258 size = 32*K - slack, // Default size of an Arena chunk (following the first)
259 non_pool_size = init_size + 32 // An initial size which is not one of above
294 // Get a new Chunk of at least size x
298 debug_only(void* malloc(size_t size);)
323 void* operator new (size_t size);
324 void* operator new (size_t size, const std::nothrow_t& nothrow_constant);
327 void* operator new(size_t size, MEMFLAGS flags);
328 void* operator new(size_t size, const std::nothrow_t& nothrow_constant, MEMFLAGS flags);
347 // Further assume size is padded out to words
349 assert( (x&(sizeof(char*)-1)) == 0, "misaligned size" );
366 assert( (x&(sizeof(char*)-1)) == 0, "misaligned size" );
389 void Afree(void *ptr, size_t size) {
391 if (ZapResourceArea) memset(ptr, badResourceValue, size); // zap freed memory
394 if (((char*)ptr) + size == _hwm) _hwm = (char*)ptr;
411 void set_size_in_bytes(size_t size);
429 #define NEW_ARENA_ARRAY(arena, type, size) \
430 (type*) (arena)->Amalloc((size) * sizeof(type))
436 #define FREE_ARENA_ARRAY(arena, type, old, size) \
437 (arena)->Afree((char*)(old), (size) * sizeof(type))
444 extern char* resource_allocate_bytes(size_t size,
446 extern char* resource_allocate_bytes(Thread* thread, size_t size,
450 extern void resource_free_bytes( char *old, size_t size );
484 void* operator new(size_t size, allocation_type type, MEMFLAGS flags);
485 void* operator new(size_t size, Arena *arena) {
486 address res = (address)arena->Amalloc(size);
490 void* operator new(size_t size) {
491 address res = (address)resource_allocate_bytes(size);
496 void* operator new(size_t size, const std::nothrow_t& nothrow_constant) {
497 address res = (address)resource_allocate_bytes(size, AllocFailStrategy::RETURN_NULL);
509 #define NEW_RESOURCE_ARRAY(type, size)\
510 (type*) resource_allocate_bytes((size) * sizeof(type))
512 #define NEW_RESOURCE_ARRAY_RETURN_NULL(type, size)\
513 (type*) resource_allocate_bytes((size) * sizeof(type), AllocFailStrategy::RETURN_NULL)
515 #define NEW_RESOURCE_ARRAY_IN_THREAD(thread, type, size)\
516 (type*) resource_allocate_bytes(thread, (size) * sizeof(type))
521 #define FREE_RESOURCE_ARRAY(type, old, size)\
522 resource_free_bytes((char*)(old), (size) * sizeof(type))
530 #define NEW_C_HEAP_ARRAY(type, size, memflags)\
531 (type*) (AllocateHeap((size) * sizeof(type), memflags))
533 #define REALLOC_C_HEAP_ARRAY(type, old, size, memflags)\
534 (type*) (ReallocateHeap((char*)old, (size) * sizeof(type), memflags))
543 #define NEW_C_HEAP_ARRAY2(type, size, memflags, pc)\
544 (type*) (AllocateHeap((size) * sizeof(type), memflags, pc))
546 #define REALLOC_C_HEAP_ARRAY2(type, old, size, memflags, pc)\
547 (type*) (ReallocateHeap((char*)old, (size) * sizeof(type), memflags, pc))