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

Reducing json_t size #707

Open
dkoreshkov opened this issue Feb 6, 2025 · 0 comments
Open

Reducing json_t size #707

dkoreshkov opened this issue Feb 6, 2025 · 0 comments

Comments

@dkoreshkov
Copy link

I suggest redefining json_t someday so that it becomes 8 bytes long instead of 16 where size_t takes 8.
Isn't 32 bits enough for a reference counter?

typedef struct json_t {
    json_type type;             // most likely 4 bytes
    volatile unsigned refcount; // should be 4 too
} json_t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant