-
Notifications
You must be signed in to change notification settings - Fork 194
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
add MP_SMALL_STACK_SIZE
option
#538
Commits on Mar 27, 2024
-
add
MP_SMALL_STACK_SIZE
optionThis adds an option to use a heap-buffer for the usually stack-based `MP_WARRAY`-sized temporary buffers. Per default it will reserve a single buffer, which can be modified * at compile-time via the `MP_WARRAY_NUM` define * at run-time by calling `mp_warray_init()` The internal structure can only be created once. If one wants to modify the maximum number of elements, the entire structure has to be free'd by calling `mp_warray_free()`. In case one wants to use this option with multiple threads, one shall use the `mp_warray_init()` function and pass appropriate locking functions. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for bd66fcc - Browse repository at this point
Copy the full SHA bd66fccView commit details -
Replace locking by atomic operations
`s_warray_init()` and `s_warray_free()` are not safe and MUST NOT be called from multiple threads. This also removes `MP_WARRAY_NUM`, since automatic initialization will not be safe for more than one thread. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for 18e67e1 - Browse repository at this point
Copy the full SHA 18e67e1View commit details -
To be able to support this for MSVC as well, we have to move this into a separate private API function. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for 795f7ba - Browse repository at this point
Copy the full SHA 795f7baView commit details -
Output gets garbeled a bit, but we only care for the result which is `Tests OK/NOP/FAIL: 50/0/0`. Add `-Wno-incomplete-setjmp-declaration` since `clang-10` shipping with Ubuntu 20.04 seems broken... and `-Wno-unknown-warning-option` since `clang-8` doesn't know about this warning... Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for 98655a8 - Browse repository at this point
Copy the full SHA 98655a8View commit details -
Add tests for MSVC multi-threading
... and fix some MSVC related (and other) things. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for fae9aa5 - Browse repository at this point
Copy the full SHA fae9aa5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 334465d - Browse repository at this point
Copy the full SHA 334465dView commit details
Commits on Mar 29, 2024
-
Use Thread Local Storage for
warray
bufferSigned-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for 33a9d0d - Browse repository at this point
Copy the full SHA 33a9d0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 513d48d - Browse repository at this point
Copy the full SHA 513d48dView commit details -
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for 4c2e177 - Browse repository at this point
Copy the full SHA 4c2e177View commit details
Commits on Apr 3, 2024
-
Run small-stack tests with valgrind
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for 6c70ef1 - Browse repository at this point
Copy the full SHA 6c70ef1View commit details -
Disable MP_SMALL_STACK_SIZE on MSVC
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
Configuration menu - View commit details
-
Copy full SHA for 3570e12 - Browse repository at this point
Copy the full SHA 3570e12View commit details