We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It is needed whenever we want to allocate an array (e.g. in memspaces) using ba_alloc with a fixed-sized pool.
The API could be something like this:
#define SEGMENT_DECLARE(type, num_elems) struct segment_#type#_#num_elems#_t { \ type elems[num_elems]; \ struct segment_t *next; \ }; #define SEGMENT(type, size) (struct segment_#type#_#num_elems#_t) void segment_array_create(ba_alloc alloc, size_t segmentSize, size_t numSegments); #define SEGMENT_CREATE(alloc, type, num_elements) ((SEGMENT(type, num_elements)*) segment_array_create(alloc, sizeof(type) * num_elements + 8, 1)); void segmentArrayDestroy(ba_alloc* alloc);
The text was updated successfully, but these errors were encountered:
@igchor this has been moved from JIRA to Github because of the JIRA cleanup. Can you add more information on why we might need this feature?
Sorry, something went wrong.
No branches or pull requests
Rationale
It is needed whenever we want to allocate an array (e.g. in memspaces) using ba_alloc with a fixed-sized pool.
API Changes
The API could be something like this:
The text was updated successfully, but these errors were encountered: