add memory function accessors #447
Labels
enhancement
new features or improvements
good first issue
something that would be simple for a newcomer to stumpless to work on
help wanted
external contributations encouraged
While stumpless currently provides a way to control the functions used to manage dynamic memory, it does not provide matching functions to retrieve the current settings. This may be useful to library users, and would also make some of the testing code cleaner as well.
General Approach
There are a few details left out of the following outline, for you to fill in as you encounter them. If you find you need help, please ask here or on the project gitter and someone can help you get past the stumbling block.
First, read this section of the development documentation on adding new functions. Once you understand how this process works, you'll be ready to define the new functions.
Add your three new functions to
include/stumpless/memory.h
and the corresponding source file. You should also add tests for your new functions intest/function/memory.cpp
.Finally, update the memory counting macros used in benchmark tests to use your new functions. These are defined in
include/test/helper/memory_counter.hpp
. They currently assume that the settings to restore are the standard library functions, but this may not always be the case. Change theINIT_MEMORY_COUNTER
macro to use your new functions instead of making this assumption.The text was updated successfully, but these errors were encountered: