Lines Matching full:the
14 The code should be easily portable to any platform with atomic operations and an mmap-style virtual…
16 …y is put in the public domain; you can redistribute it and/or modify it without any restrictions. …
19 …causing extra allocated memory overhead in the thread caches compared to these allocators. We also…
21 …l as memory overhead by comparing the virtual memory mapped with the number of bytes requested in …
29 The benchmark producing these numbers were run on an Ubuntu 16.10 machine with 8 logical cores (4 p…
31 Configuration of the thread and global caches can be important depending on your use pattern. See […
35 Before calling any other function in the API, you __MUST__ call the initialization function, either…
37 …ur use of the allocator, you __SHOULD__ call __rpmalloc_finalize__ in order to release caches and …
40 The easiest way to use the library is simply adding __rpmalloc.[h|c]__ to your project and compile …
42 __rpmalloc_initialize__ : Call at process start to initialize the allocator
44 __rpmalloc_initialize_config__ : Optional entry point to call at process start to initialize the al…
46 __rpmalloc_finalize__: Call at process exit to finalize the allocator
48 …_thread_initialize__: Call at each thread start to initialize the thread local data for the alloca…
52 __rpmalloc_config__: Get the current runtime configuration of the allocator
54 …se the __rpmalloc__/__rpfree__ and the other malloc style replacement functions. Remember all allo…
56 …the standard library malloc family of functions and have automatic initialization/finalization of …
58 For explicit first class heaps, see the __rpmalloc_heap_*__ API under [first class heaps](#first-cl…
61 …the configure python script which generates a Ninja build script, then build using ninja. The ninj…
63 The configure + ninja build also produces two shared object/dynamic libraries. The `rpmallocwrap` s…
65 The latest stable release is available in the master branch. For latest development code, use the d…
68 …The size of the thread caches is determined by an adaptive scheme where each cache is limited by a…
70 …o global cache unless thread finishes and never unmap memory pages back to the OS. Highest perform…
72 …defined to 0, set to 1 to make global caches infinite, i.e never unmap memory pages back to the OS.
76 … to 1, enables the global cache shared between all threads. Set to 0 to disable the global cache a…
78 …ed to 1, enables the per-thread cache. Set to 0 to disable the thread cache and directly unmap pag…
80 …PTIVE_THREAD_CACHE__: Introduces a simple heuristics in the thread cache size, keeping 25% of the …
83 … (default is 0, or disabled), either on compile command line or by setting the value in `rpmalloc.…
85 … either on compile command line or by setting the value in `rpmalloc.c`. If enabled, size argument…
87 … (default is 0, or disabled), either on compile command line or by setting the value in `rpmalloc.…
89 … initialization of finalization of process and threads in order to preload the library into execut…
91 To enable the runtime configurable memory page and span sizes, define __RPMALLOC_CONFIGURABLE__ to …
93 …first class heaps, define __RPMALLOC_FIRST_CLASS_HEAPS__ to 1. By default, the first class heap AP…
96 The allocator has support for huge/large pages on Windows, Linux and MacOS. To enable it, pass a no…
99 The allocator is similar in spirit to tcmalloc from the [Google Performance Toolkit](https://github…
102 The allocator is based on a fixed but configurable page alignment (defaults to 64KiB) and 16 byte b…
104 …the small blocks are [16, 1024] bytes, medium blocks (1024, 32256] bytes, and large blocks (32256,…
106 …the same granularity as the configured span size (default 64KiB). All allocations are fitted to th…
108 …The first level is a per thread single active span for each size class. The second level is a per …
110 …s, each span is completely owned by the allocating thread, and all cross-thread deallocations will…
112 …ks, or super spans, are cached in two levels. The first level is a per thread list of free super s…
115 …the allocator uses OS APIs to map virtual memory pages as needed, either `VirtualAlloc` on Windows…
117 The returned memory address from the memory map function MUST be aligned to the memory page size an…
119 …the memory page size. You can specify a custom page size when initializing rpmalloc with __rpmallo…
121 …the `span_map_count` configuration variable (which defaults to the `DEFAULT_SPAN_MAP_COUNT` value …
123 On macOS and iOS mmap requests are tagged with tag 240 for easy identification with the vmmap tool.
126 …the span size) can be subdivided into smaller spans to fulfill a need to map a new span of memory.…
128 …the span is evicted from caches and scheduled to be unmapped. The entire original super span will …
130 …the `release` parameter given to the `memory_unmap` function. It is set to 0 for decommitting indi…
133 …the allocator in the sense that it will not leave unallocated and unusable "holes" in the memory p…
135 …the meaning that a request for x bytes followed by a request of y bytes where x and y are at least…
137 …ill most likely be served from within the same span of memory pages (unless the span runs out of f…
140 …the `rpmalloc.h` documentation for the full list of functions in the heap API. The main use case o…
143 …the some other allocators, rpmalloc does not suffer as much from a producer-consumer thread scenar…
146 …ds that keep ownership of allocated memory blocks within the thread and free the blocks from the s…
148 …the difference in memory usage high and low water marks fit within the thread cache thresholds in …
151 …the mapped memory. However, the wasted memory will always be less than 4KiB (or the configured mem…
153 …the thread cache size, will put a lot of contention on the global cache. What will happen is the t…
156 …the implementation instead oversizes the memory mapping with configured span size to be able to al…
158 All entry points assume the passed values are valid, for example passing an invalid pointer to free…
160 …the call to __rpmalloc_finalize__ will not completely terminate the allocator but rather empty all…
170 This is free and unencumbered software released into the public domain.
177 In jurisdictions that recognize copyright laws, the author or authors
178 of this software dedicate any and all copyright interest in the
179 software to the public domain. We make this dedication for the benefit
180 of the public at large and to the detriment of our heirs and
185 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
186 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
188 IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
190 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
191 OTHER DEALINGS IN THE SOFTWARE.
196 You can also use this software under the MIT license if public domain is
200 The MIT License (MIT)
205 of this software and associated documentation files (the "Software"), to deal
206 in the Software without restriction, including without limitation the rights
208 copies of the Software, and to permit persons to whom the Software is
209 furnished to do so, subject to the following conditions:
211 The above copyright notice and this permission notice shall be included in
212 all copies or substantial portions of the Software.
214 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
215 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
216 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
219 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
220 THE SOFTWARE.