mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
refactor: make two functions used only in memory.c static (#34339)
After #29450 try_to_free_memory() is only used in memory.c. Also move do_outofmem_msg() closer to where it's used.
This commit is contained in:
@@ -21,10 +21,6 @@ typedef void *(*MemCalloc)(size_t, size_t);
|
||||
/// `realloc()` function signature
|
||||
typedef void *(*MemRealloc)(void *, size_t);
|
||||
|
||||
typedef void *(*MergeSortGetFunc)(void *);
|
||||
typedef void (*MergeSortSetFunc)(void *, void *);
|
||||
typedef int (*MergeSortCompareFunc)(const void *, const void *);
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
/// When unit testing: pointer to the `malloc()` function, may be altered
|
||||
extern MemMalloc mem_malloc;
|
||||
@@ -44,6 +40,10 @@ extern MemRealloc mem_realloc;
|
||||
extern bool entered_free_all_mem;
|
||||
#endif
|
||||
|
||||
typedef void *(*MergeSortGetFunc)(void *);
|
||||
typedef void (*MergeSortSetFunc)(void *, void *);
|
||||
typedef int (*MergeSortCompareFunc)(const void *, const void *);
|
||||
|
||||
EXTERN size_t arena_alloc_count INIT( = 0);
|
||||
|
||||
#define kv_fixsize_arena(a, v, s) \
|
||||
|
Reference in New Issue
Block a user