mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
Delete the lalloc() function
This commit is contained in:
parent
65273be060
commit
ee72c2b18d
@ -46,11 +46,10 @@ static void try_to_free_memory();
|
||||
|
||||
/*
|
||||
* Note: if unsigned is 16 bits we can only allocate up to 64K with alloc().
|
||||
* Use lalloc for larger blocks.
|
||||
*/
|
||||
char_u *alloc(unsigned size)
|
||||
{
|
||||
return lalloc((long_u)size, TRUE);
|
||||
return xmalloc(size);
|
||||
}
|
||||
|
||||
/// Try to free memory. Used when trying to recover from out of memory errors.
|
||||
@ -216,11 +215,6 @@ char *xstrndup(const char *str, size_t len)
|
||||
}
|
||||
|
||||
|
||||
char_u *lalloc(long_u size, int message)
|
||||
{
|
||||
return (char_u *)xmalloc((size_t)size);
|
||||
}
|
||||
|
||||
/*
|
||||
* Avoid repeating the error message many times (they take 1 second each).
|
||||
* Did_outofmem_msg is reset when a character is read.
|
||||
|
@ -127,12 +127,7 @@ char *xstpcpy(char *restrict dst, const char *restrict src);
|
||||
/// @param maxlen
|
||||
char *xstpncpy(char *restrict dst, const char *restrict src, size_t maxlen);
|
||||
|
||||
/// Old low level memory allocation function.
|
||||
///
|
||||
/// @deprecated use xmalloc() directly instead
|
||||
/// @param size
|
||||
/// @return pointer to allocated space. Never NULL
|
||||
char_u *lalloc(long_u size, int message) FUNC_ATTR_MALLOC FUNC_ATTR_ALLOC_SIZE(1);
|
||||
void do_outofmem_msg(long_u size);
|
||||
void free_all_mem(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user