Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/BLI_mempool.c
| Context not available. | |||||
| /** | /** | ||||
| * Important that this value is an is _not_ aligned with ``sizeof(void *)``. | * Important that this value is an is _not_ aligned with ``sizeof(void *)``. | ||||
| * So having a pointer to 2/4/8... aligned memory is enough to ensure the freeword will never be used. | * So having a pointer to 2/4/8... aligned memory is enough to ensure the freeword will never be used. | ||||
| * To be safe, use a word thats the same in both directions. | * To be safe, use a word that's the same in both directions. | ||||
| */ | */ | ||||
| #define FREEWORD ((sizeof(void *) > sizeof(int32_t)) ? \ | #define FREEWORD ((sizeof(void *) > sizeof(int32_t)) ? \ | ||||
| MAKE_ID_8('e', 'e', 'r', 'f', 'f', 'r', 'e', 'e') : \ | MAKE_ID_8('e', 'e', 'r', 'f', 'f', 'r', 'e', 'e') : \ | ||||
| Context not available. | |||||
| /** | /** | ||||
| * Free an element from the mempool. | * Free an element from the mempool. | ||||
| * | * | ||||
| * \note doesnt protect against double frees, don't be stupid! | * \note doesn't protect against double frees, don't be stupid! | ||||
| */ | */ | ||||
| void BLI_mempool_free(BLI_mempool *pool, void *addr) | void BLI_mempool_free(BLI_mempool *pool, void *addr) | ||||
| { | { | ||||
| Context not available. | |||||