libuv/docs
Brett Vickers c272f1f1bc memory: add uv_replace_allocator
With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This allows libuv to interoperate with projects requiring a
custom memory allocator.

Internally, all calls to malloc and free have been replaced with
uv__malloc and uv__free, respectively. The uv__malloc and uv__free
functions call malloc and free unless they have been overridden by a
previous call to uv_replace_allocator.

As part of this change, the special aligned memory allocations
performed in src/win/fs-event.c have been replaced with standard
allocations. The 4-byte alignment being requested in this file was
unnecessary, since standard allocators already guarantee at least an
8-byte alignment.

PR-URL: https://github.com/libuv/libuv/pull/231
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-03-05 20:02:16 +01:00
..
src memory: add uv_replace_allocator 2015-03-05 20:02:16 +01:00
make.bat doc: add API documentation 2014-09-11 09:38:35 +02:00
Makefile doc: add API documentation 2014-09-11 09:38:35 +02:00