Mercurial > hg > truffle
comparison src/share/vm/memory/allocation.hpp @ 14412:e2722a66aba7
Merge
author | kvn |
---|---|
date | Thu, 05 Sep 2013 11:04:39 -0700 |
parents | bdd155477289 faf2631b9334 |
children | 2b8e28fdf503 |
comparison
equal
deleted
inserted
replaced
14411:bdd155477289 | 14412:e2722a66aba7 |
---|---|
667 | 667 |
668 #define NEW_RESOURCE_OBJ_RETURN_NULL(type)\ | 668 #define NEW_RESOURCE_OBJ_RETURN_NULL(type)\ |
669 NEW_RESOURCE_ARRAY_RETURN_NULL(type, 1) | 669 NEW_RESOURCE_ARRAY_RETURN_NULL(type, 1) |
670 | 670 |
671 #define NEW_C_HEAP_ARRAY3(type, size, memflags, pc, allocfail)\ | 671 #define NEW_C_HEAP_ARRAY3(type, size, memflags, pc, allocfail)\ |
672 (type*) AllocateHeap(size * sizeof(type), memflags, pc, allocfail) | 672 (type*) AllocateHeap((size) * sizeof(type), memflags, pc, allocfail) |
673 | 673 |
674 #define NEW_C_HEAP_ARRAY2(type, size, memflags, pc)\ | 674 #define NEW_C_HEAP_ARRAY2(type, size, memflags, pc)\ |
675 (type*) (AllocateHeap((size) * sizeof(type), memflags, pc)) | 675 (type*) (AllocateHeap((size) * sizeof(type), memflags, pc)) |
676 | 676 |
677 #define NEW_C_HEAP_ARRAY(type, size, memflags)\ | 677 #define NEW_C_HEAP_ARRAY(type, size, memflags)\ |
678 (type*) (AllocateHeap((size) * sizeof(type), memflags)) | 678 (type*) (AllocateHeap((size) * sizeof(type), memflags)) |
679 | 679 |
680 #define NEW_C_HEAP_ARRAY2_RETURN_NULL(type, size, memflags, pc)\ | 680 #define NEW_C_HEAP_ARRAY2_RETURN_NULL(type, size, memflags, pc)\ |
681 NEW_C_HEAP_ARRAY3(type, size, memflags, pc, AllocFailStrategy::RETURN_NULL) | 681 NEW_C_HEAP_ARRAY3(type, (size), memflags, pc, AllocFailStrategy::RETURN_NULL) |
682 | 682 |
683 #define NEW_C_HEAP_ARRAY_RETURN_NULL(type, size, memflags)\ | 683 #define NEW_C_HEAP_ARRAY_RETURN_NULL(type, size, memflags)\ |
684 NEW_C_HEAP_ARRAY3(type, size, memflags, (address)0, AllocFailStrategy::RETURN_NULL) | 684 NEW_C_HEAP_ARRAY3(type, (size), memflags, (address)0, AllocFailStrategy::RETURN_NULL) |
685 | 685 |
686 #define REALLOC_C_HEAP_ARRAY(type, old, size, memflags)\ | 686 #define REALLOC_C_HEAP_ARRAY(type, old, size, memflags)\ |
687 (type*) (ReallocateHeap((char*)old, (size) * sizeof(type), memflags)) | 687 (type*) (ReallocateHeap((char*)(old), (size) * sizeof(type), memflags)) |
688 | 688 |
689 #define REALLOC_C_HEAP_ARRAY_RETURN_NULL(type, old, size, memflags)\ | 689 #define REALLOC_C_HEAP_ARRAY_RETURN_NULL(type, old, size, memflags)\ |
690 (type*) (ReallocateHeap((char*)old, (size) * sizeof(type), memflags, AllocFailStrategy::RETURN_NULL)) | 690 (type*) (ReallocateHeap((char*)(old), (size) * sizeof(type), memflags, AllocFailStrategy::RETURN_NULL)) |
691 | 691 |
692 #define FREE_C_HEAP_ARRAY(type, old, memflags) \ | 692 #define FREE_C_HEAP_ARRAY(type, old, memflags) \ |
693 FreeHeap((char*)(old), memflags) | 693 FreeHeap((char*)(old), memflags) |
694 | 694 |
695 // allocate type in heap without calling ctor | 695 // allocate type in heap without calling ctor |