Lines Matching refs:size

36 void trace_heap_malloc(size_t size, const char* name, void *p);
55 inline char* AllocateHeap(size_t size, MEMFLAGS flags,
58 char* p = (char*) os::malloc(size, flags, stack);
60 if (PrintMallocFree) trace_heap_malloc(size, "AllocateHeap", p);
63 vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "AllocateHeap");
68 ALWAYSINLINE char* AllocateHeap(size_t size, MEMFLAGS flags,
70 return AllocateHeap(size, flags, CURRENT_PC, alloc_failmode);
73 ALWAYSINLINE char* ReallocateHeap(char *old, size_t size, MEMFLAGS flag,
75 char* p = (char*) os::realloc(old, size, flag, CURRENT_PC);
77 if (PrintMallocFree) trace_heap_malloc(size, "ReallocateHeap", p);
80 vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "ReallocateHeap");
93 template <MEMFLAGS F> void* CHeapObj<F>::operator new(size_t size,
95 void* p = (void*)AllocateHeap(size, F, stack);
97 if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
102 template <MEMFLAGS F> void* CHeapObj<F>::operator new(size_t size) throw() {
103 return CHeapObj<F>::operator new(size, CALLER_PC);
106 template <MEMFLAGS F> void* CHeapObj<F>::operator new (size_t size,
108 void* p = (void*)AllocateHeap(size, F, stack,
111 if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
116 template <MEMFLAGS F> void* CHeapObj<F>::operator new (size_t size,
118 return CHeapObj<F>::operator new(size, nothrow_constant, CALLER_PC);
121 template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size,
123 return CHeapObj<F>::operator new(size, stack);
126 template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size)
128 return CHeapObj<F>::operator new(size, CALLER_PC);
131 template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size,
133 return CHeapObj<F>::operator new(size, nothrow_constant, stack);
136 template <MEMFLAGS F> void* CHeapObj<F>::operator new [](size_t size,
138 return CHeapObj<F>::operator new(size, nothrow_constant, CALLER_PC);
151 size_t size = length * sizeof(E);
153 return align_up(size, alignment);
158 size_t size = size_for(length);
161 char* addr = os::reserve_memory(size, NULL, alignment, flags);
166 if (os::commit_memory(addr, size, !ExecMem, "Allocator (commit)")) {
169 os::release_memory(addr, size);
176 size_t size = size_for(length);
179 char* addr = os::reserve_memory(size, NULL, alignment, flags);
181 vm_exit_out_of_memory(size, OOM_MMAP_ERROR, "Allocator (reserve)");
184 os::commit_memory_or_exit(addr, size, !ExecMem, "Allocator (commit)");