[svn:parrot] r44225 - branches/sys_mem_reduce/include/parrot

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Feb 20 11:41:45 UTC 2010


Author: bacek
Date: Sat Feb 20 11:41:44 2010
New Revision: 44225
URL: https://trac.parrot.org/parrot/changeset/44225

Log:
Add mem_internal_relloc_n_zeroed_typed macro

Modified:
   branches/sys_mem_reduce/include/parrot/memory.h

Modified: branches/sys_mem_reduce/include/parrot/memory.h
==============================================================================
--- branches/sys_mem_reduce/include/parrot/memory.h	Sat Feb 20 11:41:25 2010	(r44224)
+++ branches/sys_mem_reduce/include/parrot/memory.h	Sat Feb 20 11:41:44 2010	(r44225)
@@ -29,6 +29,7 @@
 
 #define mem_internal_realloc(x, y) mem__internal_realloc((x), (y), __FILE__, __LINE__)
 #define mem_internal_realloc_zeroed(p, x, y) mem__internal_realloc_zeroed((p), (x), (y), __FILE__, __LINE__)
+#define mem_internal_realloc_n_zeroed_typed(p, x, y, type) (type*)mem__internal_realloc_zeroed((p), (x) * sizeof(type), (y) * sizeof(type), __FILE__, __LINE__)
 #define mem_internal_free(x) mem__internal_free((x), __FILE__, __LINE__)
 
 #define mem_sys_memcopy memcpy


More information about the parrot-commits mailing list