ION was designed to be usable on deep-space flight misssions, for which flight software rules typically preclude dynamic management of system memory after initialization. In order for BSL to be integrated into ION, BSL must be adapted to use ION's native memory management system, which complies with these rules.
This is not hard, as BSL is already written to accept alternative definitions of its universally used memory management macros BSL_MALLOC, BSL_CALLOC, BSL_FREE, and BSL_FREE. A prototype for the necessary revisions is provided in the main branch of https://github.com/scburleigh/BSL.git, as briefly described in comments in BSL/src/BSLConfig.h.in:
- We need to add two small source files (ionpatch.h and ionpatch.c) in a new directory named something like BSL/src/ION_integration.
- Those files need to be added to the build. In particular, ionpatch.c needs to be compiled conditionally, e.g., dependent upon the setting of an OPT variable named something like ION_INTEGRATION.
- That same conditional compilation control needs to enable/disable a line of the form "#include ionpatch.h" within the BSL/src/BSLConfig.h.in header file, immediately after the "#ifdef __cplusplus"/"#endif" lines.