History log of /6.6.0/platform/src/cb_malloc.cc (Results 1 - 15 of 15)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v7.0.2, v6.6.1, v7.0.0, v6.5.1, v6.0.3
# becffd3b 29-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Remove __sun and __FreeBSD__ code

We don't build on those platforms and we have no idea of
the current status.

Change-Id: Ifa752904f7c69c7d4fa188deb223e4aabed23fa9

Cleanup: Remove __sun and __FreeBSD__ code

We don't build on those platforms and we have no idea of
the current status.

Change-Id: Ifa752904f7c69c7d4fa188deb223e4aabed23fa9
Reviewed-on: http://review.couchbase.org/106994
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>

show more ...


Revision tags: v5.5.4
# b2487b03 05-Sep-2018 James Harrison <00jamesh@gmail.com>

MB-30029: Add support for jemalloc sized deallocation

Make use of jemalloc support for sized deallocation by having
the sized delete operator call je_sdallocx if available.

Chan

MB-30029: Add support for jemalloc sized deallocation

Make use of jemalloc support for sized deallocation by having
the sized delete operator call je_sdallocx if available.

Change-Id: I8db4bc6c66fab415128ff52f8bd1b6f8e2dca80b
Reviewed-on: http://review.couchbase.org/105091
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# b30d5004 13-Feb-2019 Ben Huddleston <ben.huddleston@couchbase.com>

Revert "MB-30029: Add support for jemalloc sized deallocation"

This reverts commit e11be8160817150aa9fded367f7f63bf939fa6d4.

Change-Id: I2aa38cf056ccab624da85481389d4a541cb21f8c

Revert "MB-30029: Add support for jemalloc sized deallocation"

This reverts commit e11be8160817150aa9fded367f7f63bf939fa6d4.

Change-Id: I2aa38cf056ccab624da85481389d4a541cb21f8c
Reviewed-on: http://review.couchbase.org/104889
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Tested-by: Ben Huddleston <ben.huddleston@couchbase.com>

show more ...


# e11be816 05-Sep-2018 James Harrison <00jamesh@gmail.com>

MB-30029: Add support for jemalloc sized deallocation

Make use of jemalloc support for sized deallocation by having
the sized delete operator call je_sdallocx if available.

Chan

MB-30029: Add support for jemalloc sized deallocation

Make use of jemalloc support for sized deallocation by having
the sized delete operator call je_sdallocx if available.

Change-Id: Ic2011e7d66a5fa642925b5ef8589113f0ca7df28
Reviewed-on: http://review.couchbase.org/99241
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.5.0, v4.6.5, v5.0.0
# a06044f3 07-Aug-2017 James Harrison <00jamesh@gmail.com>

Add cb_malloc_usable_size and interpose malloc_usable_size

As we have a global new replacement, libraries could end up calling the
system malloc_usable_size (if present) with a pointer t

Add cb_malloc_usable_size and interpose malloc_usable_size

As we have a global new replacement, libraries could end up calling the
system malloc_usable_size (if present) with a pointer to memory
allocated by JEMalloc.

This was first noted when testing with RocksDB, but would safeguard
against it cropping up elsewhere.

Change-Id: Ifd2beae94381c6ec86edf65e93469e67ccbdda7c
Reviewed-on: http://review.couchbase.org/82043
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.6.0, v4.6.0-DP
# 3de7855b 04-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Remove unused support for tcmalloc

Change-Id: I5d62332736d0264b6368d49eee791f8fbe77bf42
Reviewed-on: http://review.couchbase.org/68319
Tested-by: buildbot <build@couchbase.com>
R

Remove unused support for tcmalloc

Change-Id: I5d62332736d0264b6368d49eee791f8fbe77bf42
Reviewed-on: http://review.couchbase.org/68319
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.5.1-MP1
# 77eaabc3 30-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc

Only change necessary is on OS X, where we have cbmalloc and friends
call je_malloc directly (when it is selected) instead

MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc

Only change necessary is on OS X, where we have cbmalloc and friends
call je_malloc directly (when it is selected) instead of calling
malloc().

This means that cbmalloc no longer goes from:

* cbmalloc -> call cbmalloc_hooks, call malloc()
-> darwin_zone.cc:malloc (ep_engine) -> call hooks, call je_malloc

and instead does:

* cbmalloc -> call cbmalloc_hooks, call je_malloc.

Change-Id: I7bfd2c27886eb9b4ec84eec06f7e3258db0b781a
Reviewed-on: http://review.couchbase.org/67819
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# f12b9798 09-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20586: [cbmalloc] With jemalloc, use system symbols for now

TEMP: jemalloc has no new/delete hooks itself, and we instead rely on
either our own custom zone (OS X; darwin_zone.c) or o

MB-20586: [cbmalloc] With jemalloc, use system symbols for now

TEMP: jemalloc has no new/delete hooks itself, and we instead rely on
either our own custom zone (OS X; darwin_zone.c) or our own
malloc/free symbols (alloc_hooks_jemalloc.cc) to intercept
malloc/realloc etc and call the memory hook (before chaining to the
real allocator).

This means that during the transition to cbmalloc, we still need to
call the 'normal' malloc function to ensure that the current
allocator-specific memory tracking hooks (memcached
MallocHooks::add_new_hook) are invoked.

When we subsequently flip MallocHooks::add_new_hook to instead call
cbmalloc's memory tracking cb_add_new_hook), we will change the
MALLOC_PREFIX to 'je_' and remove our own custom zone & own
malloc/free symbols.

This patch essentially lets us change the rest of KV-engine to call
cb_malloc/cb_free (instead of 'malloc/free') and have no effect on the
actual way memory tracking is done *until* we flip the MALLOC_PREFIX
to 'je_' in a subsequent patch.

Change-Id: I0ca29cf3b14bf326f413472e5330b4ac1fe9af19
Reviewed-on: http://review.couchbase.org/67817
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.5.1
# a865ae07 18-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Add cb_malloc memory allocation API

Add a set of our own memory allocation functions:

* cb_malloc
* cb_calloc
* cb_realloc
* cb_free

These function in

MB-20586: Add cb_malloc memory allocation API

Add a set of our own memory allocation functions:

* cb_malloc
* cb_calloc
* cb_realloc
* cb_free

These function in the same way as their standard library namesakes,
with the addition of:

1. Allows applications to register callbacks to be called on any
memory allocation / deletion (so memcached/ep-engine can track
allocations).

2. Allow us to use an alternative memory allocator instead of the
system (TCMalloc, jemalloc etc).

Also add equivalents for libc functions which allocate memory
internally. Instead we allocate via cb_malloc:

* cb_strdup

Change-Id: I45e15b2b2e3a939344322164354acbae4aba2d72
Reviewed-on: http://review.couchbase.org/67811
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...


# 8616395e 20-Sep-2016 Dave Rigby <daver@couchbase.com>

Revert "Merge remote-tracking branch 'couchbase/watson'"

This reverts commit 21cd2c5f687a378a25cfadbb0fff95036287d90e, reversing
changes made to 21991f2650ce31e787d6666268ef6a15b0bc4cfb.

Revert "Merge remote-tracking branch 'couchbase/watson'"

This reverts commit 21cd2c5f687a378a25cfadbb0fff95036287d90e, reversing
changes made to 21991f2650ce31e787d6666268ef6a15b0bc4cfb.

The merge needs to be split into two chunks - the first which fixes
the existing incorrect uses of malloc/free etc (and then other
components can also have their fixes merged), the second chunk to
actually start using cb_malloc.

Reverting back to pre-merge, so it can be split.

Change-Id: I29da333981733513275c40d5114552a98179db91
Reviewed-on: http://review.couchbase.org/67810
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# d74f1970 30-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc

(Re-apply after previous revert, due to being merged before other
dependant patches in projects' were merged).

O

MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc

(Re-apply after previous revert, due to being merged before other
dependant patches in projects' were merged).

Only change necessary is on OS X, where we have cbmalloc and friends
call je_malloc directly (when it is selected) instead of calling
malloc().

This means that cbmalloc no longer goes from:

* cbmalloc -> call cbmalloc_hooks, call malloc()
-> darwin_zone.cc:malloc (ep_engine) -> call hooks, call je_malloc

and instead does:

* cbmalloc -> call cbmalloc_hooks, call je_malloc.

Change-Id: I7bfd2c27886eb9b4ec84eec06f7e3258db0b781a
Reviewed-on: http://review.couchbase.org/67540
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# 9ca87494 09-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20586: [cbmalloc] With jemalloc, use system symbols for now

TEMP: jemalloc has no new/delete hooks itself, and we instead rely on
either our own custom zone (OS X; darwin_zone.c) or o

MB-20586: [cbmalloc] With jemalloc, use system symbols for now

TEMP: jemalloc has no new/delete hooks itself, and we instead rely on
either our own custom zone (OS X; darwin_zone.c) or our own
malloc/free symbols (alloc_hooks_jemalloc.cc) to intercept
malloc/realloc etc and call the memory hook (before chaining to the
real allocator).

This means that during the transition to cbmalloc, we still need to
call the 'normal' malloc function to ensure that the current
allocator-specific memory tracking hooks (memcached
MallocHooks::add_new_hook) are invoked.

When we subsequently flip MallocHooks::add_new_hook to instead call
cbmalloc's memory tracking cb_add_new_hook), we will change the
MALLOC_PREFIX to 'je_' and remove our own custom zone & own
malloc/free symbols.

This patch essentially lets us change the rest of KV-engine to call
cb_malloc/cb_free (instead of 'malloc/free') and have no effect on the
actual way memory tracking is done *until* we flip the MALLOC_PREFIX
to 'je_' in a subsequent patch.

Change-Id: I0ca29cf3b14bf326f413472e5330b4ac1fe9af19
Reviewed-on: http://review.couchbase.org/67543
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


# d849ccac 08-Sep-2016 Dave Rigby <daver@couchbase.com>

Revert "MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc"

This patch needs further changes to be committed to memcached before
merging (memory tracking is currently broken

Revert "MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc"

This patch needs further changes to be committed to memcached before
merging (memory tracking is currently broken with this in). Backing
out until those are ready.

This reverts commit f9c4772b89b4d3ff809b0e1d70809315924cbed2.

Change-Id: I31efb9bb626c7ee6ab06caeab17df23b8c1b636a
Reviewed-on: http://review.couchbase.org/67521
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Dave Rigby <daver@couchbase.com>

show more ...


# f9c4772b 30-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc

Only change necessary is on OS X, where we have cbmalloc and friends call
je_malloc directly (when it is selected) instead

MB-20770: Switch memory tracking from {TC,je}malloc -> cbmalloc

Only change necessary is on OS X, where we have cbmalloc and friends call
je_malloc directly (when it is selected) instead of calling malloc().

This means that cbmalloc no longer goes from:

* cbmalloc -> call cbmalloc_hooks, call malloc()
-> darwin_zone.cc:malloc (ep_engine) -> call hooks, call je_malloc

and instead does:

* cbmalloc -> call cbmalloc_hooks, call je_malloc.

Change-Id: Ib602c4165e4c526fad03dc5445a5bc267670f909
Reviewed-on: http://review.couchbase.org/67302
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# 4835251c 18-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Add cb_malloc memory allocation API

Add a set of our own memory allocation functions:

* cb_malloc
* cb_calloc
* cb_realloc
* cb_free

These function in

MB-20586: Add cb_malloc memory allocation API

Add a set of our own memory allocation functions:

* cb_malloc
* cb_calloc
* cb_realloc
* cb_free

These function in the same way as their standard library namesakes,
with the addition of:

1. Allows applications to register callbacks to be called on any
memory allocation / deletion (so memcached/ep-engine can track
allocations).

2. Allow us to use an alternative memory allocator instead of the
system (TCMalloc, jemalloc etc).

Also add equivalents for libc functions which allocate memory
internally. Instead we allocate via cb_malloc:

* cb_strdup

Change-Id: I45e15b2b2e3a939344322164354acbae4aba2d72
Reviewed-on: http://review.couchbase.org/67065
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...