Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_memarena.h
| Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| struct MemArena; | struct MemArena; | ||||
| typedef struct MemArena MemArena; | typedef struct MemArena MemArena; | ||||
| struct MemArena *BLI_memarena_new(const size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2) ATTR_MALLOC; | struct MemArena *BLI_memarena_new(const size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2) ATTR_MALLOC; | ||||
| void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1); | void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1); | ||||
| void BLI_memarena_use_malloc(struct MemArena *ma) ATTR_NONNULL(1); | void BLI_memarena_use_malloc(struct MemArena *ma) ATTR_NONNULL(1); | ||||
| void BLI_memarena_use_calloc(struct MemArena *ma) ATTR_NONNULL(1); | void BLI_memarena_use_calloc(struct MemArena *ma) ATTR_NONNULL(1); | ||||
| void BLI_memarena_use_align(struct MemArena *ma, const size_t align) ATTR_NONNULL(1); | void BLI_memarena_use_align(struct MemArena *ma, const size_t align) ATTR_NONNULL(1); | ||||
| void BLI_memarena_set_threadsafe(struct MemArena *ma); | |||||
| void BLI_memarena_clear_threadsafe(struct MemArena *ma); | |||||
| void *BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2); | void *BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2); | ||||
| void *BLI_memarena_calloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2); | void *BLI_memarena_calloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2); | ||||
| void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1); | void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #endif /* __BLI_MEMARENA_H__ */ | #endif /* __BLI_MEMARENA_H__ */ | ||||