aboutsummaryrefslogtreecommitdiff
path: root/src/memory.c
Commit message (Collapse)AuthorAge
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
| | | | | | Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.
* Add channel moduleThiago de Arruda2014-05-12
| | | | | | - Add channel module that exposes the API over arbitrary streams - Add `xmemdup` for duplicating memory chunks - Make job exit callback optional
* Delete the lalloc() functionFelipe Oliveira Carvalho2014-05-07
|
* replaced `vim_free()` calls with `free()` callsMatthias Beyer2014-05-05
|
* Use portable format specifiers: Case %lu - localized - EMSGU.Eliseo Martínez2014-05-04
| | | | | | Problem EMSGN was being used to print a format string using "%lu", which is incorrect because EMSGN casts its argument to int64_t. Solution Use EMGSU instead.
* memory: implement xstp(n)cpyNicolas Hillegeer2014-04-29
| | | | | Both are implemented to POSIX 2008 spec, though I'm not sure I'm happy about stpncpy's behaviour.
* Remove `alloc_clear`John Schmidt2014-04-28
| | | | | Use `xcalloc` instead. Inline `alloc_tv` and `alloc_string_tv` in eval.c
* (verbose_)?try_malloc() to use on buf_write()Felipe Oliveira Carvalho2014-04-24
| | | | | | | | | | | There will be more use cases for try_malloc(): see #556. - Reimplemented xmalloc() using try_malloc(). - verbose_try_malloc() is just like try_malloc() but shows an out-of-memory error message before returning NULL. - Let the compiler generate size>>1 assembly for signed types. We're not using old compilers here. - Add proper function attributes to the new functions in memory.h
* Use xmalloc() and xmemdupz() in file_pat_to_reg_pat()Felipe Oliveira Carvalho2014-04-24
| | | | | | | | Unfortunately there's still a case where NULL can be returned from file_pat_to_reg_pat(). xmemdupz() and xmallocz() aren't static anymore. There are many use cases for these function.
* Use portable format specifiers: Case %lu - localized - EMSGN.Eliseo Martínez2014-04-23
| | | | | | Fix uses of plain "%lu" within EMSGN(): - Replace "%lu" with "%" PRIu64. - No argument cast needed. EMSGN() will take care of that.
* Remove `lalloc_clear`John Schmidt2014-04-19
| | | | | Use `xcalloc` instead. Change some local variables to avoid casting.
* Replace `alloc_check` by `xmalloc`John Schmidt2014-04-10
| | | | | | | | | | | `alloc_check` is just a wrapper around xmalloc, so we can remove it and use xmalloc directly. ref #487 / #488 The call was replaced in the following files: - ex_cmds.c - misc1.c - ops.c
* Fix/add more files with to clint-files.txtThiago de Arruda2014-04-08
|
* Implement xcalloc and use it in klist.h (use xrealloc as well)Felipe Oliveira Carvalho2014-04-07
| | | | Bonus: implement lalloc_clear and alloc_clear using xcalloc
* Remove simpler cases of OOM error handling (after *alloc calls)Felipe Oliveira Carvalho2014-04-06
| | | | | | | | | | | | | | | | | | By simpler cases I mean cases where the OOM error is not expected to be handled by the caller of the function that calls `alloc`, `lalloc`, `xrealloc`, `xmalloc`, `alloc_clear`, and `lalloc_clear`. These are the functions that: - Do not return an allocated buffer - Have OOM as the only error condition I took note of the functions that expect the caller to handle the OOM error and will go through them to check all the callers that may be handling OOM error in future commits. I'm ignoring eval.c and ex_.c in this series of commits. eval.c will soon be obsolete and I will deal with ex_.c in later PRs.
* Implement `xstrdup` and `xstrndup`Thiago de Arruda2014-04-06
| | | | | Utility functions for copying strings to newly-allocated chunks. They either succeed or exit the program.
* Extract memory.c from misc2.cJohn Schmidt2014-04-04