Skip to content
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

Generic Memory Pools #7418

Merged
merged 8 commits into from
Apr 30, 2024
Merged

Generic Memory Pools #7418

merged 8 commits into from
Apr 30, 2024

Commits on Apr 22, 2024

  1. Generic Memory Pools

    1. Modify wolfSSL_CTX_load_static_memory() to use wc_LoadStaticMemory()
       instead of reimplementing it.
    2. Initialize the pointers in wc_LoadStaticMemory() to null.
    3. Whitespace changes.
    ejohnstown committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    2168b15 View commit details
    Browse the repository at this point in the history
  2. Generic Memory Pools

    1. Add the function wc_LoadStaticMemory_ex(), which is a generic version
       of wc_LoadStaticMemory().
    2. Modify wc_LoadStaticMemory() to call wc_LoadStaticMemory_ex() with
       the bucket lists.
    3. Rename the function wolfSSL_load_static_memory() as
       wc_partition_static_memory(), make it static, move it higher in the file.
    ejohnstown committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    7481644 View commit details
    Browse the repository at this point in the history
  3. Generic Memory Pools

    1. Add generic function wolfSSL_StaticBufferSz_ex() where one specifies
       the memory bucket list sizes and distribution.
    2. Rewrote wolfSSL_StaticBufferSz() in terms of the new function.
    3. Changed the list pointers on wc_LoadStaticMemory_ex() and
       wc_init_memory_heap() to be pointers to const.
    ejohnstown committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    15a0ae4 View commit details
    Browse the repository at this point in the history
  4. Generic Memory Pools

    1. Add checks for listSz against WOLFMEM_MAX_BUCKETS.
    2. Use WOLFMEM_DEF_BUCKETS for the size when using the default memory
       descriptions.
    3. Whitespace.
    ejohnstown committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    7a0bcb0 View commit details
    Browse the repository at this point in the history
  5. Generic Memory Pools

    1. Make the function wolfSSL_GetMemStats() public.
    ejohnstown committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    0b5c83f View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. Generic Memory Pools

    1. Added some extra parameter checking to wc_LoadStaticMemory_ex().
    2. Added some extra parameter checking to wc_StaticBufferSz_ex().
    3. Rename some parameters and add some logging prints.
    4. Some static functions have some parameter checking and they are only
       calling in one spot, remove it.
    ejohnstown committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    d239948 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Generic Memory Pools

    1. Add API test for function `wc_LoadStaticMemory_ex()`.
    ejohnstown committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    f6ae432 View commit details
    Browse the repository at this point in the history
  2. Generic Memory Pools

    1. Add API for function `wc_UnloadStaticMemory()` which frees the mutex
       used by the static memory pool.
    2. Update the `wc_LoadStaticMemory_ex()` test to free the static memory
       pool's mutex on each successful test case.
    ejohnstown committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    6be5526 View commit details
    Browse the repository at this point in the history