Skip to content

jemalloc_pool should not require user to link with jemalloc  #891

Closed
@lplewa

Description

@lplewa

Currently user needs to pass -ljemalloc linker flag if uses jemalloc pool (jemalloc_pool.a)

This is an issue as jemalloc exports malloc, realloc, free symbols, so actually liking with jemalloc overrides system functions.
That is annoying for the user, who don't want to use jmalloc instead of glibc functions.

This is also a problem for proxy lib's threshold #883 as dlsym(RTLD_NEXT, "malloc"); will return malloc@jemalloc not malloc@glibc. See also #894.

to overcome this issue we can:

  • use dlopen, and dlsym in jemalloc_pool
  • link statically with jemaloc in jemalloc_pool

Not sure what is a better approach.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions