Sign inSign up

openeuler/jemalloc

Sponsored OSS

By openeuler

•Updated about 10 hours ago

Image
0

300

openeuler/jemalloc repository overview

⁠Quick reference

⁠jemalloc | openEuler

Current jemalloc docker images are built on the openEuler⁠. This repository is free to use and exempted from per-user rate limits.

jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. jemalloc first came into use as the FreeBSD libc allocator in 2005, and since then it has found its way into numerous applications that rely on its predictable behavior. In 2010 jemalloc development efforts broadened to include developer support features such as heap profiling and extensive monitoring/tuning hooks. Modern jemalloc releases continue to be integrated back into FreeBSD, and therefore versatility remains critical. Ongoing development efforts trend toward making jemalloc among the best allocators for a broad range of demanding applications, and eliminating/mitigating weaknesses that have practical repercussions for real world applications.

Learn more on jemalloc⁠.

The tag of each jemalloc docker image is consist of the version of jemalloc and the version of basic image. The details are as follows

TagCurrentlyArchitectures
5.4.0-oe2403sp4⁠jemalloc 5.4.0 on openEuler 24.03-LTS-SP4amd64, arm64

⁠Usage

In this usage, users can select the corresponding {Tag} based on their requirements.

  • Pull the openeuler/jemalloc image from docker

    docker pull openeuler/jemalloc:{Tag}
    
  • Check the installed jemalloc version

    docker run --rm openeuler/jemalloc:{Tag} jemalloc-config --version
    
  • Compile and run a program linked against jemalloc

    Create a file named hello.c in the current directory:

    #include <stdlib.h>
    #include <stdio.h>
    
    int main(void) {
        void *p = malloc(64);
        printf("jemalloc malloc returned %p\n", p);
        free(p);
        return 0;
    }
    

    Compile and run it inside the container:

    docker run --rm -v "$(pwd)":/work -w /work openeuler/jemalloc:{Tag} \
        sh -c 'gcc -o hello hello.c -ljemalloc && ./hello'
    
  • Use jemalloc as the allocator of another program via LD_PRELOAD

    docker run --rm openeuler/jemalloc:{Tag} \
        sh -c 'LD_PRELOAD=/usr/local/lib/libjemalloc.so.2 ls -l /usr/local/lib'
    
  • Start a long-running container for exploration

    docker run -d --name my-jemalloc openeuler/jemalloc:{Tag} sleep infinity
    
  • View the container logs

    docker logs -f my-jemalloc
    
  • To get an interactive shell

    docker exec -it my-jemalloc bash
    

⁠Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images⁠.

Tag summary

Content type

Image

Digest

sha256:7876bc070…

Size

173.3 MB

Last updated

about 10 hours ago

docker pull openeuler/jemalloc

This week's pulls

Pulls:

13

Last week