Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 580408 - Glue for jemalloc 3.0.0. r=khuey
- Loading branch information
Showing
12 changed files
with
162 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "mozilla/Types.h" | ||
#include "jemalloc_types.h" | ||
|
||
extern int je_mallctl(const char*, void*, size_t*, void*, size_t); | ||
|
||
MOZ_EXPORT_API (void) | ||
jemalloc_stats(jemalloc_stats_t *stats) | ||
{ | ||
size_t size = sizeof(stats->mapped); | ||
je_mallctl("stats.mapped", &stats->mapped, &size, NULL, 0); | ||
je_mallctl("stats.allocated", &stats->allocated, &size, NULL, 0); | ||
stats->committed = -1; | ||
stats->dirty = -1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
DEPTH = ../.. | ||
topsrcdir = @top_srcdir@ | ||
srcdir = @srcdir@ | ||
|
||
VPATH = $(srcdir) $(srcdir)/src/src | ||
|
||
include $(DEPTH)/config/autoconf.mk | ||
|
||
MODULE = jemalloc | ||
LIBRARY_NAME = jemalloc | ||
FORCE_STATIC_LIB = 1 | ||
|
||
ifdef MOZ_GLUE_PROGRAM_LDFLAGS | ||
SDK_LIBRARY = $(REAL_LIBRARY) | ||
DIST_INSTALL = 1 | ||
endif | ||
|
||
CSRCS := $(notdir $(wildcard $(srcdir)/src/src/*.c)) | ||
ifneq ($(OS_TARGET),Darwin) | ||
CSRCS := $(filter-out zone.c,$(CSRCS)) | ||
endif | ||
|
||
include $(topsrcdir)/config/rules.mk | ||
|
||
LOCAL_INCLUDES += \ | ||
-I$(srcdir)/src/include \ | ||
-Isrc/include \ | ||
$(NULL) | ||
|
||
ifdef _MSC_VER | ||
LOCAL_INCLUDES += -I$(srcdir)/src/include/msvc_compat | ||
|
||
DEFINES += -DDLLEXPORT | ||
endif | ||
|
||
ifeq ($(OS_TARGET),Linux) | ||
# For mremap | ||
DEFINES += -D_GNU_SOURCE | ||
endif | ||
|
||
ifdef GNU_CC | ||
CFLAGS += -std=gnu99 | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters