Skip to content

Commit

Permalink
Documentation: Adding note about using the jemalloc library.
Browse files Browse the repository at this point in the history
Updating the reference documentation with the inclusion of possible building
problems with libjemalloc and solution suggestions.

Reported-at: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/2015748
Signed-off-by: Roberto Bartzen Acosta <[email protected]>
Acked-by: Eelco Chaudron <[email protected]>
Reviewed-by: Frode Nordahl <[email protected]>
[simon: rebased; added leading '$' to last configure example]
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
r-acosta authored and Simon Horman committed Feb 9, 2024
1 parent be695f2 commit 2832faa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Documentation/intro/install/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,22 @@ you wish to link with jemalloc add it to LIBS::

$ ./configure LIBS=-ljemalloc

.. note::
Linking Open vSwitch with the jemalloc shared library may not work as
expected in certain operating system development environments. You can
override the automatic compiler decision to avoid possible linker issues by
passing ``-fno-lto`` or ``-fno-builtin`` flag since the jemalloc override
standard built-in memory allocation functions such as malloc, calloc, etc.
Both options can solve possible jemalloc linker issues with pros and cons for
each case, feel free to choose the path that appears best to you. Disabling
LTO flag example::

$ ./configure LIBS=-ljemalloc CFLAGS="-g -O2 -fno-lto"

Disabling built-in flag example::

$ ./configure LIBS=-ljemalloc CFLAGS="-g -O2 -fno-builtin"

.. _general-building:

Building
Expand Down

0 comments on commit 2832faa

Please sign in to comment.