summaryrefslogtreecommitdiff
path: root/deps/uv/docs
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <saghul@gmail.com>2015-06-03 21:18:55 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2015-06-04 00:09:05 +0200
commitaa33db32380fe05a3bc7a2e320bbf63a6adddf08 (patch)
tree6794c5f2c1a46e1e319f50860bf4b7d558b24587 /deps/uv/docs
parenta804026c9b5b9f8d6316fd5e9fdb9f96f7e1c6b3 (diff)
downloadandroid-node-v8-aa33db32380fe05a3bc7a2e320bbf63a6adddf08.tar.gz
android-node-v8-aa33db32380fe05a3bc7a2e320bbf63a6adddf08.tar.bz2
android-node-v8-aa33db32380fe05a3bc7a2e320bbf63a6adddf08.zip
deps: update libuv to version 1.6.0
Fixes: https://github.com/joyent/node/issues/9310 PR-URL: https://github.com/nodejs/io.js/pull/1889 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/uv/docs')
-rw-r--r--deps/uv/docs/src/misc.rst57
-rw-r--r--deps/uv/docs/src/tcp.rst2
2 files changed, 58 insertions, 1 deletions
diff --git a/deps/uv/docs/src/misc.rst b/deps/uv/docs/src/misc.rst
index bb97a26005..9708c5dea4 100644
--- a/deps/uv/docs/src/misc.rst
+++ b/deps/uv/docs/src/misc.rst
@@ -26,6 +26,26 @@ Data types
.. note::
On Windows this field is ULONG.
+.. c:type:: void* (*uv_malloc_func)(size_t size)
+
+ Replacement function for :man:`malloc(3)`.
+ See :c:func:`uv_replace_allocator`.
+
+.. c:type:: void* (*uv_realloc_func)(void* ptr, size_t size)
+
+ Replacement function for :man:`realloc(3)`.
+ See :c:func:`uv_replace_allocator`.
+
+.. c:type:: void* (*uv_calloc_func)(size_t count, size_t size)
+
+ Replacement function for :man:`calloc(3)`.
+ See :c:func:`uv_replace_allocator`.
+
+.. c:type:: void (*uv_free_func)(void* ptr)
+
+ Replacement function for :man:`free(3)`.
+ See :c:func:`uv_replace_allocator`.
+
.. c:type:: uv_file
Cross platform representation of a file handle.
@@ -126,6 +146,26 @@ API
Returns the libuv version number as a string. For non-release versions
"-pre" is appended, so the version number could be "1.2.3-pre".
+.. c:function:: int uv_replace_allocator(uv_malloc_func malloc_func, uv_realloc_func realloc_func, uv_calloc_func calloc_func, uv_free_func free_func)
+
+ .. versionadded:: 1.6.0
+
+ Override the use of the standard library's :man:`malloc(3)`,
+ :man:`calloc(3)`, :man:`realloc(3)`, :man:`free(3)`, memory allocation
+ functions.
+
+ This function must be called before any other libuv function is called or
+ after all resources have been freed and thus libuv doesn't reference
+ any allocated memory chunk.
+
+ On success, it returns 0, if any of the function pointers is NULL it
+ returns UV_EINVAL.
+
+ .. warning:: There is no protection against changing the allocator multiple
+ times. If the user changes it they are responsible for making
+ sure the allocator is changed while no memory was allocated with
+ the previous allocator, or that they are compatible.
+
.. c:function:: uv_buf_t uv_buf_init(char* base, unsigned int len)
Constructor for :c:type:`uv_buf_t`.
@@ -227,6 +267,23 @@ API
Changes the current working directory.
+.. c:function:: int uv_os_homedir(char* buffer, size_t* size)
+
+ Gets the current user's home directory. On Windows, `uv_os_homedir()` first
+ checks the `USERPROFILE` environment variable using
+ `GetEnvironmentVariableW()`. If `USERPROFILE` is not set,
+ `GetUserProfileDirectoryW()` is called. On all other operating systems,
+ `uv_os_homedir()` first checks the `HOME` environment variable using
+ :man:`getenv(3)`. If `HOME` is not set, :man:`getpwuid_r(3)` is called. The
+ user's home directory is stored in `buffer`. When `uv_os_homedir()` is
+ called, `size` indicates the maximum size of `buffer`. On success or
+ `UV_ENOBUFS` failure, `size` is set to the string length of `buffer`.
+
+ .. warning::
+ `uv_os_homedir()` is not thread safe.
+
+ .. versionadded:: 1.6.0
+
.. uint64_t uv_get_free_memory(void)
.. c:function:: uint64_t uv_get_total_memory(void)
diff --git a/deps/uv/docs/src/tcp.rst b/deps/uv/docs/src/tcp.rst
index 2b5d268ddd..dd746fe87f 100644
--- a/deps/uv/docs/src/tcp.rst
+++ b/deps/uv/docs/src/tcp.rst
@@ -72,7 +72,7 @@ API
not guarantee that the call to :c:func:`uv_listen` or :c:func:`uv_tcp_connect`
will succeed as well.
- `flags` con contain ``UV_TCP_IPV6ONLY``, in which case dual-stack support
+ `flags` can contain ``UV_TCP_IPV6ONLY``, in which case dual-stack support
is disabled and only IPv6 is used.
.. c:function:: int uv_tcp_getsockname(const uv_tcp_t* handle, struct sockaddr* name, int* namelen)