Commit Graph
45 Commits
Author SHA1 Message Date
Patrick Pelissier 1e196fe22a Port to new spec M_MEMORY_FULL 2025-05-07 21:02:23 +02:00
Patrick Pelissier 6d621703eb Copyright go to 2025 year 2025-03-01 11:03:38 +01:00
Patrick Pelissier 26cec1591a * Remove some obsolete macros
* Fix spelling
* A little bit of refactoring
2024-01-19 21:37:47 +01:00
Patrick Pelissier 52b58c5a51 Happy new year 2024 2024-01-19 21:37:47 +01:00
Patrick Pelissier b50813713a Define internal M_INLINE:
it is used to control the inline semantics.
By combining it with optimize option "-fno-inline"
for the internal M*LIB function (using _Pragma optimize)
we can control easily if we want to use an inline version
or call of an external function.

Define new user API:
* M_USE_EXTERN_DECL : define it before including any MLIB header to requests to call the M*LIB functions and don't inline then.
* M_USE_EXTERN_DEF  : define it once in a translation unit to define the M*LIB functions. This translation unit shall contain all templated macro too.
If you use one option, you need to use the other one too for another translation unit.
2023-06-11 23:32:02 +02:00
Patrick Pelissier 219c62ff5d Provide a way to alter the standard naming convention for the functions
Close #72
2023-04-22 09:33:08 +02:00
Patrick Pelissier fc34fa80b5 Properly mark condition for entering memory failure. 2023-04-07 23:50:03 +02:00
Patrick Pelissier 2f76652f2b Maintenance 2023-03-03 22:50:14 +01:00
Patrick Pelissier 942cf32519 Maintenance: separate macros for type and core functions. 2023-03-03 22:02:07 +01:00
Patrick Pelissier 4366e8eeab Separate macro into smaller macros
to ease reading and enable easier customization of generation
2023-01-20 23:45:40 +01:00
Patrick Pelissier a2ae209992 Happy new year 2023-01-02 12:57:41 +01:00
Patrick Pelissier b691758fa9 Update comments 2022-04-10 11:10:01 +02:00
Patrick Pelissier b8cd679679 Move generating macro into the m_ namespace and create a wrapper using historical names for compatibility with existing code 2022-03-24 20:46:49 +01:00
Patrick Pelissier 19b01b404d Migrate to 2022 2022-03-12 20:25:45 +01:00
Patrick Pelissier 165ec09061 Rename user customizable macros
to be compliant with other
and clearer that they can be customized.
2021-02-20 00:10:26 +01:00
Patrick Pelissier 517da1b999 Rename generated internal functions
to avoid "poluting" userspace naming.
2021-02-13 11:45:05 +01:00
Patrick Pelissier 25497bd96f Factorize code so that _DEF macros use _DEF_AS ones 2021-02-07 23:04:59 +01:00
Patrick Pelissier 25fe26deaa Happy new year 2021-01-13 20:18:01 +01:00
Patrick Pelissier a29682ca29 Create M_ASSERT macro to encapsulate assert within M*LIB
The goal is to enable the user to override this macro if needed so that it can enable or disable the M*LIB witout impacting its own assertions.
2020-10-29 22:46:17 +01:00
Patrick Pelissier 54d4b80368 Reformat macro to 80 characters 2020-10-21 23:23:40 +02:00
Patrick Pelissier 7f26ef0f1c Add new macros to define container
with the full given name.
2020-10-03 14:07:14 +02:00
Patrick Pelissier b396b42808 Update comments 2020-10-03 14:07:14 +02:00
Patrick Pelissier b3a1a75f6f Rename internal types:
a suffix ending with _ct means confidential type
ans is reserved for M*LIB internal usage.

OPLIST doesn't use the external types
but rather the internal types.
It enables to be independent of the real names
of the external types.
Such external names are planned to be fully customizable
(i.e. the user may define a name that suits its coding style)
2020-10-03 14:07:14 +02:00
Patrick Pelissier 1b206931df Transform TAB into SPACE 2020-07-22 20:51:45 +02:00
Patrick Pelissier 8a36b5ff15 Workaround to avoid CLANG unused function warnings 2020-07-09 22:14:00 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Patrick Pelissier 8b3a4a802c Happy new year! 2019-01-02 18:12:07 +01:00
Patrick Pelissier b6a3387f8a User are able to customize the number of elements of a mempool globaly. 2018-07-30 22:02:46 +02:00
Patrick Pelissier 96202aa78f Do not use reserved identifiers of the C standard (See 7.1.3 Reserved identifiers) 2018-07-14 14:35:14 +02:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier f39c8ebaba Fix comment 2018-01-04 22:08:08 +01:00
Patrick Pelissier dc719cf329 Update comment 2017-10-25 22:07:13 +02:00
Patrick Pelissier ab5a3ce31b Clean up 2017-10-25 22:06:03 +02:00
Patrick Pelissier 2e564088b0 Simplify the inclusion of headers. 2017-09-16 10:14:45 +02:00
Patrick Pelissier ee053a901a Clean up code. 2017-08-09 23:39:57 +02:00
Patrick Pelissier b49e286ae2 Remove prefix mempool from mempools.
See commit about shared pointer.
2017-07-25 23:03:23 +02:00
Patrick Pelissier edb7ad2796 Update comment. 2017-05-26 12:27:04 +02:00
Patrick Pelissier 6d29968e34 Remove 'count' parameters (avoid to call free for alloc blocks: clear do everything
in one go).

Add contract.
2017-04-25 23:41:43 +02:00
Patrick Pelissier 1898e7e793 Improve computation of number of elements per mempool
so that we don't go above 16K, and lost a complete
page just for 8 bytes!
2017-04-08 20:57:34 +02:00
Patrick Pelissier 5418856d5e Make (justified) warning silent with clang.
(Already explained in the note)
2017-04-07 17:32:50 +02:00
Patrick Pelissier 736e0550ca Simplify & fix issue for C++ 2017-04-07 17:28:34 +02:00
Patrick Pelissier eceedbd9ed Remove unused function call. 2017-04-01 01:08:14 +02:00
Patrick Pelissier 9bbef32913 Fix bug 2017-03-31 23:10:07 +02:00
Patrick Pelissier 6d6150e189 Update comment. 2017-03-31 21:22:57 +02:00
Patrick Pelissier 39e8c9e678 Add fast mempool module. 2017-03-31 21:14:45 +02:00