From 8e8f637987eb09f6b6d966e2c90ff57c1b28873e Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Tue, 24 Nov 2020 08:51:37 +0100 Subject: [PATCH 01/18] Add simple stats --- lwmem/src/include/lwmem/lwmem.h | 11 +++++++++++ lwmem/src/include/lwmem/lwmem_opt.h | 8 ++++++++ lwmem/src/lwmem/lwmem.c | 11 +++++++++++ 3 files changed, 30 insertions(+) diff --git a/lwmem/src/include/lwmem/lwmem.h b/lwmem/src/include/lwmem/lwmem.h index b70136e..6913a03 100644 --- a/lwmem/src/include/lwmem/lwmem.h +++ b/lwmem/src/include/lwmem/lwmem.h @@ -67,6 +67,14 @@ typedef struct lwmem_block { or `0` when block is considered free */ } lwmem_block_t; +/** + * \brief Statistics structure + */ +typedef struct { + uint32_t nr_alloc; /*!< Number of all allocated blocks in single instance */ + uint32_t nr_free; /*!< Number of frees in the LwMEM instance */ +} lwmem_stats_t; + /** * \brief LwMEM main structure */ @@ -78,6 +86,9 @@ typedef struct lwmem { #if LWMEM_CFG_OS || __DOXYGEN__ LWMEM_CFG_OS_MUTEX_HANDLE mutex; /*!< System mutex for OS */ #endif /* LWMEM_CFG_OS || __DOXYGEN__ */ +#if LWMEM_CFG_ENABLE_STATS || __DOXYGEN__ + lwmem_stats_t stats; /*!< Statistics */ +#endif /* LWMEM_CFG_ENABLE_STATS || __DOXYGEN__ */ #if defined(LWMEM_DEV) && !__DOXYGEN__ lwmem_block_t start_block_first_use; /*!< Value of start block for very first time. This is used only during validation process and is removed in final use */ diff --git a/lwmem/src/include/lwmem/lwmem_opt.h b/lwmem/src/include/lwmem/lwmem_opt.h index 13140c4..71e0a90 100644 --- a/lwmem/src/include/lwmem/lwmem_opt.h +++ b/lwmem/src/include/lwmem/lwmem_opt.h @@ -82,6 +82,14 @@ extern "C" { #define LWMEM_CFG_ALIGN_NUM ((size_t)4) #endif +/** + * \brief Enables `1` or disables `0` statistics in the library + * + */ +#ifndef LWMEM_CFG_ENABLE_STATS +#define LWMEM_CFG_ENABLE_STATS 0 +#endif + /** * \} */ diff --git a/lwmem/src/lwmem/lwmem.c b/lwmem/src/lwmem/lwmem.c index d5ee9b0..333bf79 100644 --- a/lwmem/src/lwmem/lwmem.c +++ b/lwmem/src/lwmem/lwmem.c @@ -144,6 +144,13 @@ #define LWMEM_UNPROTECT(lw) #endif /* !LWMEM_CFG_OS */ +/* Statistics part */ +#if LWMEM_CFG_ENABLE_STATS +#define LWMEM_INC_STATS(field) (++(field)) +#else +#define LWMEM_INC_STATS(field) +#endif /* LWMEM_CFG_ENABLE_STATS */ + /** * \brief LwMEM default structure used by application */ @@ -387,6 +394,8 @@ prv_alloc(lwmem_t* const lw, const lwmem_region_t* region, const size_t size) { prv_split_too_big_block(lw, curr, final_size); /* Split block if it is too big */ LWMEM_BLOCK_SET_ALLOC(curr); /* Set block as allocated */ + LWMEM_INC_STATS(LWMEM_GET_LW(lw)->stats.nr_alloc); + return retval; } @@ -403,6 +412,8 @@ prv_free(lwmem_t* const lw, void* const ptr) { LWMEM_GET_LW(lw)->mem_available_bytes += block->size; /* Increase available bytes */ prv_insert_free_block(lw, block); /* Put block back to list of free block */ + + LWMEM_INC_STATS(LWMEM_GET_LW(lw)->stats.nr_free); } } From 40465930b391812d1ecfebd9978153336997b6ee Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Mon, 30 Nov 2020 15:45:15 +0100 Subject: [PATCH 02/18] Create FUNDING.yml --- .github/FUNDING.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..77b3607 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +custom: ['paypal.me/tilz0R'] From 59e4965006a93b537018e851823db4692f149738 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Mon, 30 Nov 2020 16:00:50 +0100 Subject: [PATCH 03/18] Add option to ignore user apps with uncommented macro --- lwmem/src/include/lwmem/lwmem_opt.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lwmem/src/include/lwmem/lwmem_opt.h b/lwmem/src/include/lwmem/lwmem_opt.h index 71e0a90..17b752f 100644 --- a/lwmem/src/include/lwmem/lwmem_opt.h +++ b/lwmem/src/include/lwmem/lwmem_opt.h @@ -34,6 +34,9 @@ #ifndef LWMEM_HDR_OPT_H #define LWMEM_HDR_OPT_H +/* Uncomment to ignore user options (or set macro in compiler flags) */ +/* #define LWMEM_IGNORE_USER_OPTS */ + /* Include application options */ #ifndef LWMEM_IGNORE_USER_OPTS #include "lwmem_opts.h" From e40e3dd43580e7dca4a7696de71bd4211497725f Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Mon, 30 Nov 2020 21:21:05 +0100 Subject: [PATCH 04/18] Add donate button --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 8e73efd..29e8802 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,7 +8,7 @@ LwMEM is lightweight dynamic memory manager optimized for embedded systems. .. rst-class:: center .. rst-class:: index_links - :ref:`download_library` :ref:`getting_started` `Open Github `_ + :ref:`download_library` :ref:`getting_started` `Open Github `_ `Donate `_ Features ^^^^^^^^ From 59cb33a15b0ccd745c3145577ab72798ce94fa23 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sat, 5 Dec 2020 01:24:34 +0100 Subject: [PATCH 05/18] Add logo on all --- docs/conf.py | 2 +- docs/index.rst | 3 +++ docs/static/images/logo.drawio | 1 + docs/static/images/logo.svg | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 docs/static/images/logo.drawio create mode 100644 docs/static/images/logo.svg diff --git a/docs/conf.py b/docs/conf.py index 8b240a8..db45bb7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -99,7 +99,7 @@ 'includehidden': True, 'titles_only': False } -html_logo = 'static/images/logo_tm.png' +html_logo = 'static/images/logo.svg' github_url = 'https://github.com/MaJerle/lwmem' html_baseurl = 'https://docs.majerle.eu/projects/lwmem/' diff --git a/docs/index.rst b/docs/index.rst index 29e8802..6c78805 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,6 +5,9 @@ Welcome to the documentation for version |version|. LwMEM is lightweight dynamic memory manager optimized for embedded systems. +.. image:: static/images/logo.svg + :align: center + .. rst-class:: center .. rst-class:: index_links diff --git a/docs/static/images/logo.drawio b/docs/static/images/logo.drawio new file mode 100644 index 0000000..8238bdc --- /dev/null +++ b/docs/static/images/logo.drawio @@ -0,0 +1 @@ +jZLLbsMgEEW/xstItkmiZNs0TaUm2WSRNTITgwoei+Di9OuL68EPRZW6gjnzAO4lYTvTHiyv5QkF6CRPRZuw1yTPs3SzCUtHHj3ZrgmUVgkqGsFFfUPsJNooAfdZoUPUTtVzWGBVQeFmjFuLfl52Qz0/teYlPIFLwfUzvSrhZE83q3Tk76BKGU/OUsoYHosJ3CUX6CeI7RO2s4iu35l2B7oTL+rS9739kR0uZqFy/2k4L8QStsYfz6Z5WW4/bvqaLWjKF9cNPfjoT/sT3dg9ogwWm0pANylL2IuXysGl5kWX9cH4wKQzmtJ3Z/FzkGsdyA0rR96yLh60SEPw/JB4K7AO2gmihx0ADTj7CCWUZctV30K/LI+xHz3L1mSEnPgVfeT0Tcph9Khk2JCYMRxN+81Nvj7b/wA= \ No newline at end of file diff --git a/docs/static/images/logo.svg b/docs/static/images/logo.svg new file mode 100644 index 0000000..a4e82b3 --- /dev/null +++ b/docs/static/images/logo.svg @@ -0,0 +1,3 @@ + + +
LwMEM
LwMEM
\ No newline at end of file From 0f46e0ed037d1f46024fafcb34667108cc1afa4f Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sat, 5 Dec 2020 08:58:16 +0100 Subject: [PATCH 06/18] Add v prefix in version --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index db45bb7..ebd7d5e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ author = 'Tilen MAJERLE' # The full version, including alpha/beta/rc tags -version = '1.4.0' +version = 'v1.4.0' # Try to get branch at which this is running # and try to determine which version to display in sphinx From c2e8332bb90a0698f945e6eb865b970a55605617 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sat, 12 Dec 2020 10:49:28 +0100 Subject: [PATCH 07/18] Tab offset --- dev/VisualStudio/lwmem_opts.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/VisualStudio/lwmem_opts.h b/dev/VisualStudio/lwmem_opts.h index 72e12e4..e0819ef 100644 --- a/dev/VisualStudio/lwmem_opts.h +++ b/dev/VisualStudio/lwmem_opts.h @@ -42,7 +42,8 @@ * Open "include/lwmem/lwmem_opt.h" and * copy & replace here settings you want to change values */ -#define LWMEM_CFG_OS 1 -#define LWMEM_CFG_OS_MUTEX_HANDLE HANDLE +#define LWMEM_CFG_OS 1 +#define LWMEM_CFG_OS_MUTEX_HANDLE HANDLE +#define LWMEM_CFG_ENABLE_STATS 0 #endif /* OW_HDR_OPTS_H */ From 03a2653d3e668dcc2145ceb5ddba21491071ea74 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sat, 12 Dec 2020 10:57:24 +0100 Subject: [PATCH 08/18] Generic docs update --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index ebd7d5e..1c5e11e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -112,7 +112,7 @@ 'css/custom.css', ] html_js_files = [ - 'https://kit.fontawesome.com/3102794088.js' + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css' ] master_doc = 'index' From fd3aa4f1002c2a4a3ac21ffbdb31b41201a263b0 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Mon, 29 Mar 2021 14:10:00 +0200 Subject: [PATCH 09/18] Add Changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e60b7c9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +## v1.4.0 + +- New artistic code style +- Replace configuration +- Several bug fixes + +## v1.3.0 + +- Added option for custom LwMEM instance for complete isolation +- Added `_ex` functions for extended features for custom instances +- Added macros for backward-compatible, default instance, allocation functions +- Added option to force LwMEM to allocate memory at specific region +- Added win32 examples + +## v1.2.0 + +- Fix comments to easily undestand architecture +- Migrate examples to CMSIS-OS v2 +- Use pre-increment instead of post-increment +- Other C code style fixes + +## v1.1.0 + +- Added support for thread-safety application +- Added boundary check of all internal pointers +- Added tests code directly in library +- Bug fixes From 3a2a986238b2e0354454f5a300bd931d4c1af320 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Mon, 5 Apr 2021 21:33:21 +0200 Subject: [PATCH 10/18] Add memory cleanup option --- lwmem/src/include/lwmem/lwmem.h | 1 - lwmem/src/include/lwmem/lwmem_opt.h | 10 ++++++++++ lwmem/src/lwmem/lwmem.c | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lwmem/src/include/lwmem/lwmem.h b/lwmem/src/include/lwmem/lwmem.h index 6913a03..18153d0 100644 --- a/lwmem/src/include/lwmem/lwmem.h +++ b/lwmem/src/include/lwmem/lwmem.h @@ -34,7 +34,6 @@ #ifndef LWMEM_HDR_H #define LWMEM_HDR_H -#include #include #include #include "lwmem/lwmem_opt.h" diff --git a/lwmem/src/include/lwmem/lwmem_opt.h b/lwmem/src/include/lwmem/lwmem_opt.h index 17b752f..ee3b2fd 100644 --- a/lwmem/src/include/lwmem/lwmem_opt.h +++ b/lwmem/src/include/lwmem/lwmem_opt.h @@ -85,6 +85,16 @@ extern "C" { #define LWMEM_CFG_ALIGN_NUM ((size_t)4) #endif +/** + * \brief Enables `1` or disables `0` memory cleanup on free operation (or realloc). + * + * It resets unused memory to `0x00` and prevents other applications seeing old data. + * It is disabled by default since it has performance penalties. + * / +#ifndef LWMEM_CFG_CLEAN_MEMORY +#define LWMEM_CFG_CLEAN_MEMORY 0 +#endif + /** * \brief Enables `1` or disables `0` statistics in the library * diff --git a/lwmem/src/lwmem/lwmem.c b/lwmem/src/lwmem/lwmem.c index 333bf79..517b3a9 100644 --- a/lwmem/src/lwmem/lwmem.c +++ b/lwmem/src/lwmem/lwmem.c @@ -32,6 +32,7 @@ * Version: v1.4.0 */ #include +#include #include "lwmem/lwmem.h" #if LWMEM_CFG_OS @@ -209,6 +210,11 @@ static void prv_insert_free_block(lwmem_t* const lw, lwmem_block_t* nb) { lwmem_block_t* prev; + /* Check valid inputs */ + if (nb == NULL) { + return; + } + /* * Try to find position to put new block in-between * Search until all free block addresses are lower than entry block @@ -225,6 +231,17 @@ prv_insert_free_block(lwmem_t* const lw, lwmem_block_t* nb) { * Previous block is last free block before input block */ +#if LWMEM_CFG_CLEAN_MEMORY + /* + * Reset user memory. This is to reset memory + * after it has been freed by the application. + * + * By doing this, we protect data left by app + * and we make sure new allocations cannot see old information + */ + LWMEM_MEMSET(LWMEM_GET_PTR_FROM_BLOCK(nb), 0x00, nb->size - LWMEM_BLOCK_META_SIZE); +#endif /* LWMEM_CFG_RESET_MEMORY */ + /* * Check if previous block and input block together create one big contiguous block * If this is the case, merge blocks together and increase previous block by input block size From d2b76dd08ebe7c2770696a8cbe2dd3ea0e9e5fb7 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Mon, 5 Apr 2021 21:35:22 +0200 Subject: [PATCH 11/18] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e60b7c9..eef42e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Develop + +- Add option to cleanup memory on free and realloc operations + ## v1.4.0 - New artistic code style From c460dc2c61722a80c2a59b29dcd26c3fa891d516 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Thu, 8 Apr 2021 18:46:13 +0200 Subject: [PATCH 12/18] Enable memory cleanup --- dev/VisualStudio/lwmem_opts.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/VisualStudio/lwmem_opts.h b/dev/VisualStudio/lwmem_opts.h index e0819ef..ba15f76 100644 --- a/dev/VisualStudio/lwmem_opts.h +++ b/dev/VisualStudio/lwmem_opts.h @@ -45,5 +45,6 @@ #define LWMEM_CFG_OS 1 #define LWMEM_CFG_OS_MUTEX_HANDLE HANDLE #define LWMEM_CFG_ENABLE_STATS 0 +#define LWMEM_CFG_CLEAN_MEMORY 1 -#endif /* OW_HDR_OPTS_H */ +#endif /* LWMEM_HDR_OPTS_H */ From 475051964692f26f6227585976bd588f7ed7038e Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Thu, 8 Apr 2021 18:57:43 +0200 Subject: [PATCH 13/18] Modify config to get version from tag --- docs/conf.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1c5e11e..8982521 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,18 +19,19 @@ # Run doxygen first # read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' # if read_the_docs_build: -subprocess.call('doxygen doxyfile.doxy', shell=True) +# subprocess.call('doxygen doxyfile.doxy', shell=True) # -- Project information ----------------------------------------------------- project = 'LwMEM' copyright = '2020, Tilen MAJERLE' author = 'Tilen MAJERLE' -# The full version, including alpha/beta/rc tags -version = 'v1.4.0' +# Default version +version = 'v0.0.0' # Try to get branch at which this is running # and try to determine which version to display in sphinx +# Version is using git tag if on master or "latest-develop" if on develop branch git_branch = '' res = os.popen('git branch').read().strip() for line in res.split("\n"): @@ -38,15 +39,18 @@ git_branch = line[1:].strip() # Decision for display version -try: - if git_branch.index('develop') >= 0: - version = "latest-develop" -except Exception: - print("Exception for index check") - -# For debugging purpose +if git_branch == 'master' || git_branch == 'main': + version = os.popen('git describe --tags --abbrev=0').read().strip() + if version == '': + version = 'v.0.0.0' +elif git_branch == 'develop': + version = 'latest-develop' +else: + version = 'branch-' + git_branch + +# For debugging purpose only print("GIT BRANCH: " + git_branch) -print("VERSION: " + version) +print("GIT VERSION: " + version) # -- General configuration --------------------------------------------------- @@ -99,7 +103,7 @@ 'includehidden': True, 'titles_only': False } -html_logo = 'static/images/logo.svg' +html_logo = 'static/images/logo_tm.png' github_url = 'https://github.com/MaJerle/lwmem' html_baseurl = 'https://docs.majerle.eu/projects/lwmem/' @@ -112,7 +116,7 @@ 'css/custom.css', ] html_js_files = [ - 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css' + 'https://kit.fontawesome.com/3102794088.js' ] master_doc = 'index' @@ -123,7 +127,7 @@ # # breathe_projects = { - "lwmem": "_build/xml/" + "lwmem": "_build/xml/" } breathe_default_project = "lwmem" breathe_default_members = ('members', 'undoc-members') \ No newline at end of file From 628c9e3052c4a1248759d60d317ba65aefa46011 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Thu, 8 Apr 2021 19:01:35 +0200 Subject: [PATCH 14/18] Fix default version and wrong or operator --- docs/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8982521..b0ac763 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,23 +26,23 @@ copyright = '2020, Tilen MAJERLE' author = 'Tilen MAJERLE' -# Default version -version = 'v0.0.0' - # Try to get branch at which this is running # and try to determine which version to display in sphinx # Version is using git tag if on master or "latest-develop" if on develop branch +version = '' git_branch = '' + +# Get current branch res = os.popen('git branch').read().strip() for line in res.split("\n"): if line[0] == '*': git_branch = line[1:].strip() # Decision for display version -if git_branch == 'master' || git_branch == 'main': +if git_branch == 'master' or git_branch == 'main': version = os.popen('git describe --tags --abbrev=0').read().strip() if version == '': - version = 'v.0.0.0' + version = 'v0.0.0' elif git_branch == 'develop': version = 'latest-develop' else: From bf1c0243cbb05526c1ce38ee4d4258547eb62d35 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Thu, 8 Apr 2021 19:07:31 +0200 Subject: [PATCH 15/18] Automatic version parser for sphinx --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index b0ac763..c41b55c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,7 @@ # Run doxygen first # read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' # if read_the_docs_build: -# subprocess.call('doxygen doxyfile.doxy', shell=True) +subprocess.call('doxygen doxyfile.doxy', shell=True) # -- Project information ----------------------------------------------------- project = 'LwMEM' From b1ec3f40ef116789d282d7b6d442761e024fcd82 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Fri, 9 Apr 2021 20:45:17 +0200 Subject: [PATCH 16/18] conf.py update --- docs/conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c41b55c..d394593 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,11 +39,12 @@ git_branch = line[1:].strip() # Decision for display version -if git_branch == 'master' or git_branch == 'main': +git_branch = git_branch.replace('(HEAD detached at ', '').replace(')', '') +if git_branch.find('master') >= 0 or git_branch.find('main') >= 0: version = os.popen('git describe --tags --abbrev=0').read().strip() if version == '': version = 'v0.0.0' -elif git_branch == 'develop': +elif git_branch.find('develop') != -1 and not (git_branch.find('develop-') >= 0 or git_branch.find('develop/') >= 0): version = 'latest-develop' else: version = 'branch-' + git_branch From 9bc2d49d02e16a886344ddb579a958eb7562de4f Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sat, 10 Apr 2021 11:33:09 +0200 Subject: [PATCH 17/18] Fix requirements for all repositories --- docs/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index c0ffd67..eb5e0fd 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,7 @@ breathe>=4.9.1 colorama -docutils>=0.14 -sphinx>=2.0.1 +docutils==0.16 +sphinx>=3.5.1 sphinx_rtd_theme sphinx-tabs sphinxcontrib-svg2pdfconverter From 725454a49818d5a8c07ca2f535c27403cd58d955 Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 11 Apr 2021 10:57:46 +0200 Subject: [PATCH 18/18] Prepare for version v1.5.0 --- CHANGELOG.md | 2 ++ dev/VisualStudio/lwmem_opts.h | 2 +- examples/stm32/lwmem_rtos_stm32l496_discovery/inc/lwmem_opts.h | 2 +- examples/stm32/lwmem_rtos_stm32l496_discovery/inc/main.h | 2 +- examples/stm32/lwmem_rtos_stm32l496_discovery/src/main.c | 2 +- examples/stm32/lwmem_stm32l496_discovery/inc/lwmem_opts.h | 2 +- examples/stm32/lwmem_stm32l496_discovery/inc/main.h | 2 +- examples/stm32/lwmem_stm32l496_discovery/src/main.c | 2 +- examples/win32/lwmem/lwmem_opts.h | 2 +- examples/win32/lwmem_multi_ins_multi_region/lwmem_opts.h | 2 +- examples/win32/lwmem_multi_region/lwmem_opts.h | 2 +- examples/win32/lwmem_os/lwmem_opts.h | 2 +- lwmem/src/include/lwmem/lwmem.h | 2 +- lwmem/src/include/lwmem/lwmem_opt.h | 2 +- lwmem/src/include/lwmem/lwmem_opts_template.h | 2 +- lwmem/src/include/system/lwmem_sys.h | 2 +- lwmem/src/lwmem/lwmem.c | 2 +- lwmem/src/system/lwmem_sys_cmsis_os.c | 2 +- lwmem/src/system/lwmem_sys_template.c | 2 +- lwmem/src/system/lwmem_sys_win32.c | 2 +- 20 files changed, 21 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eef42e1..db83283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Develop +## v1.5.0 + - Add option to cleanup memory on free and realloc operations ## v1.4.0 diff --git a/dev/VisualStudio/lwmem_opts.h b/dev/VisualStudio/lwmem_opts.h index ba15f76..f767b2c 100644 --- a/dev/VisualStudio/lwmem_opts.h +++ b/dev/VisualStudio/lwmem_opts.h @@ -29,7 +29,7 @@ * This file is part of Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/lwmem_opts.h b/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/lwmem_opts.h index 4cc3b81..8700174 100644 --- a/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/lwmem_opts.h +++ b/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/lwmem_opts.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/main.h b/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/main.h index 76a6068..a2693bd 100644 --- a/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/main.h +++ b/examples/stm32/lwmem_rtos_stm32l496_discovery/inc/main.h @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef __MAIN_H #define __MAIN_H diff --git a/examples/stm32/lwmem_rtos_stm32l496_discovery/src/main.c b/examples/stm32/lwmem_rtos_stm32l496_discovery/src/main.c index 15f6fe2..44da98e 100644 --- a/examples/stm32/lwmem_rtos_stm32l496_discovery/src/main.c +++ b/examples/stm32/lwmem_rtos_stm32l496_discovery/src/main.c @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #include "main.h" #include "cmsis_os.h" diff --git a/examples/stm32/lwmem_stm32l496_discovery/inc/lwmem_opts.h b/examples/stm32/lwmem_stm32l496_discovery/inc/lwmem_opts.h index 1bf1921..0112e6e 100644 --- a/examples/stm32/lwmem_stm32l496_discovery/inc/lwmem_opts.h +++ b/examples/stm32/lwmem_stm32l496_discovery/inc/lwmem_opts.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/examples/stm32/lwmem_stm32l496_discovery/inc/main.h b/examples/stm32/lwmem_stm32l496_discovery/inc/main.h index 76a6068..a2693bd 100644 --- a/examples/stm32/lwmem_stm32l496_discovery/inc/main.h +++ b/examples/stm32/lwmem_stm32l496_discovery/inc/main.h @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef __MAIN_H #define __MAIN_H diff --git a/examples/stm32/lwmem_stm32l496_discovery/src/main.c b/examples/stm32/lwmem_stm32l496_discovery/src/main.c index 374349b..29beed4 100644 --- a/examples/stm32/lwmem_stm32l496_discovery/src/main.c +++ b/examples/stm32/lwmem_stm32l496_discovery/src/main.c @@ -27,7 +27,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #include "main.h" #include "lwmem/lwmem.h" diff --git a/examples/win32/lwmem/lwmem_opts.h b/examples/win32/lwmem/lwmem_opts.h index 1bf1921..0112e6e 100644 --- a/examples/win32/lwmem/lwmem_opts.h +++ b/examples/win32/lwmem/lwmem_opts.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/examples/win32/lwmem_multi_ins_multi_region/lwmem_opts.h b/examples/win32/lwmem_multi_ins_multi_region/lwmem_opts.h index 1bf1921..0112e6e 100644 --- a/examples/win32/lwmem_multi_ins_multi_region/lwmem_opts.h +++ b/examples/win32/lwmem_multi_ins_multi_region/lwmem_opts.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/examples/win32/lwmem_multi_region/lwmem_opts.h b/examples/win32/lwmem_multi_region/lwmem_opts.h index 1bf1921..0112e6e 100644 --- a/examples/win32/lwmem_multi_region/lwmem_opts.h +++ b/examples/win32/lwmem_multi_region/lwmem_opts.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/examples/win32/lwmem_os/lwmem_opts.h b/examples/win32/lwmem_os/lwmem_opts.h index 0e95788..1243399 100644 --- a/examples/win32/lwmem_os/lwmem_opts.h +++ b/examples/win32/lwmem_os/lwmem_opts.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/lwmem/src/include/lwmem/lwmem.h b/lwmem/src/include/lwmem/lwmem.h index 18153d0..07c7163 100644 --- a/lwmem/src/include/lwmem/lwmem.h +++ b/lwmem/src/include/lwmem/lwmem.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_H #define LWMEM_HDR_H diff --git a/lwmem/src/include/lwmem/lwmem_opt.h b/lwmem/src/include/lwmem/lwmem_opt.h index ee3b2fd..78beeee 100644 --- a/lwmem/src/include/lwmem/lwmem_opt.h +++ b/lwmem/src/include/lwmem/lwmem_opt.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPT_H #define LWMEM_HDR_OPT_H diff --git a/lwmem/src/include/lwmem/lwmem_opts_template.h b/lwmem/src/include/lwmem/lwmem_opts_template.h index 08f7910..b9ad475 100644 --- a/lwmem/src/include/lwmem/lwmem_opts_template.h +++ b/lwmem/src/include/lwmem/lwmem_opts_template.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_OPTS_H #define LWMEM_HDR_OPTS_H diff --git a/lwmem/src/include/system/lwmem_sys.h b/lwmem/src/include/system/lwmem_sys.h index e4bcd66..4d988b0 100644 --- a/lwmem/src/include/system/lwmem_sys.h +++ b/lwmem/src/include/system/lwmem_sys.h @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #ifndef LWMEM_HDR_SYS_H #define LWMEM_HDR_SYS_H diff --git a/lwmem/src/lwmem/lwmem.c b/lwmem/src/lwmem/lwmem.c index 517b3a9..2ce199f 100644 --- a/lwmem/src/lwmem/lwmem.c +++ b/lwmem/src/lwmem/lwmem.c @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #include #include diff --git a/lwmem/src/system/lwmem_sys_cmsis_os.c b/lwmem/src/system/lwmem_sys_cmsis_os.c index 0d964e3..f0831d8 100644 --- a/lwmem/src/system/lwmem_sys_cmsis_os.c +++ b/lwmem/src/system/lwmem_sys_cmsis_os.c @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #include "system/lwmem_sys.h" diff --git a/lwmem/src/system/lwmem_sys_template.c b/lwmem/src/system/lwmem_sys_template.c index ab77b8d..1d41e56 100644 --- a/lwmem/src/system/lwmem_sys_template.c +++ b/lwmem/src/system/lwmem_sys_template.c @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #include "system/lwmem_sys.h" diff --git a/lwmem/src/system/lwmem_sys_win32.c b/lwmem/src/system/lwmem_sys_win32.c index a957783..6b1e0aa 100644 --- a/lwmem/src/system/lwmem_sys_win32.c +++ b/lwmem/src/system/lwmem_sys_win32.c @@ -29,7 +29,7 @@ * This file is part of LwMEM - Lightweight dynamic memory manager library. * * Author: Tilen MAJERLE - * Version: v1.4.0 + * Version: v1.5.0 */ #include "system/lwmem_sys.h"