aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/jemalloc/src/extent_mmap.c
diff options
context:
space:
mode:
authorbugaevskiy <bugaevskiy@yandex-team.ru>2022-02-10 16:46:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:17 +0300
commita6e0145a095c7bb3770d6e07aee301de5c73f96e (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/jemalloc/src/extent_mmap.c
parentc7f68570483e493f4ddaf946de7b3a420ee621b0 (diff)
downloadydb-a6e0145a095c7bb3770d6e07aee301de5c73f96e.tar.gz
Restoring authorship annotation for <bugaevskiy@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/jemalloc/src/extent_mmap.c')
-rw-r--r--contrib/libs/jemalloc/src/extent_mmap.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/contrib/libs/jemalloc/src/extent_mmap.c b/contrib/libs/jemalloc/src/extent_mmap.c
index ca42b1353b..17fd1c8f95 100644
--- a/contrib/libs/jemalloc/src/extent_mmap.c
+++ b/contrib/libs/jemalloc/src/extent_mmap.c
@@ -1,42 +1,42 @@
-#define JEMALLOC_EXTENT_MMAP_C_
-#include "jemalloc/internal/jemalloc_preamble.h"
-#include "jemalloc/internal/jemalloc_internal_includes.h"
-
-#include "jemalloc/internal/assert.h"
-#include "jemalloc/internal/extent_mmap.h"
-
-/******************************************************************************/
-/* Data. */
-
-bool opt_retain =
-#ifdef JEMALLOC_RETAIN
- true
-#else
- false
-#endif
- ;
-
-/******************************************************************************/
-
-void *
-extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero,
- bool *commit) {
- assert(alignment == ALIGNMENT_CEILING(alignment, PAGE));
- void *ret = pages_map(new_addr, size, alignment, commit);
- if (ret == NULL) {
- return NULL;
- }
- assert(ret != NULL);
- if (*commit) {
- *zero = true;
- }
- return ret;
-}
-
-bool
-extent_dalloc_mmap(void *addr, size_t size) {
- if (!opt_retain) {
- pages_unmap(addr, size);
- }
- return opt_retain;
-}
+#define JEMALLOC_EXTENT_MMAP_C_
+#include "jemalloc/internal/jemalloc_preamble.h"
+#include "jemalloc/internal/jemalloc_internal_includes.h"
+
+#include "jemalloc/internal/assert.h"
+#include "jemalloc/internal/extent_mmap.h"
+
+/******************************************************************************/
+/* Data. */
+
+bool opt_retain =
+#ifdef JEMALLOC_RETAIN
+ true
+#else
+ false
+#endif
+ ;
+
+/******************************************************************************/
+
+void *
+extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero,
+ bool *commit) {
+ assert(alignment == ALIGNMENT_CEILING(alignment, PAGE));
+ void *ret = pages_map(new_addr, size, alignment, commit);
+ if (ret == NULL) {
+ return NULL;
+ }
+ assert(ret != NULL);
+ if (*commit) {
+ *zero = true;
+ }
+ return ret;
+}
+
+bool
+extent_dalloc_mmap(void *addr, size_t size) {
+ if (!opt_retain) {
+ pages_unmap(addr, size);
+ }
+ return opt_retain;
+}