Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-08 17:59:59 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-08 17:59:59 +0300
commitcac3443d4ed4f3dd1a2dbf86627c0017dedefbb3 (patch)
tree31a7387ed6f83239767eeb6eb88e5a2b5edb5ef5 /intern/guardedalloc/MEM_guardedalloc.h
parent6c8e3e303d15b59df4c592244a7650021b4e8bbb (diff)
Guardedalloc: added MEM_reallocN function to do simple alloc/memcpy/free,
not as optimized as a system realloc but I've had to do this often enough manually to justify a utility function.
Diffstat (limited to 'intern/guardedalloc/MEM_guardedalloc.h')
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index e404f174935..2c3aab8eb2b 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -85,6 +85,13 @@ extern "C" {
void *MEM_dupallocN(void *vmemh);
/**
+ * Reallocates a block of memory, and returns pointer to the newly
+ * allocated block, the old one is freed. this is not as optimized
+ * as a system realloc but just makes a new allocation and copies
+ * over from existing memory. */
+ void *MEM_reallocN(void *vmemh, unsigned int len);
+
+ /**
* Allocate a block of memory of size len, with tag name str. The
* memory is cleared. The name must be static, because only a
* pointer to it is stored ! */