Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tightly pack the cJSON struct #313

Closed
wants to merge 1 commit into from
Closed

Commits on Nov 27, 2018

  1. Tightly pack the cJSON struct

    Running pahole(https://linux.die.net/man/1/pahole) flags cJSON as a
    packable struct on x86-64.
    
    This patch moves the members of type 'int' next to each other and plugs
    the two 4-bytes holes. This reduces the struct size from 64-bytes to
    56-bytes.
    see https://godbolt.org/z/gUr5ue
    marcomagdy committed Nov 27, 2018
    Configuration menu
    Copy the full SHA
    a8a727a View commit details
    Browse the repository at this point in the history