]> Kevux Git Server - fll/commit
Update: f_memory tweaks, always call memset() on new allocations.
authorKevin Day <thekevinday@gmail.com>
Mon, 14 Dec 2020 01:46:11 +0000 (19:46 -0600)
committerKevin Day <thekevinday@gmail.com>
Mon, 14 Dec 2020 01:46:11 +0000 (19:46 -0600)
commitaec6fa9a4f7c683044e9098fdb085e8aa4c6119a
tree8e0c740854910a536b69e73d3441efc99229841e
parentf05cd13c723ba1f4a4f393884dcc118c9c0a6851
Update: f_memory tweaks, always call memset() on new allocations.

This is already done with reallocations.
Be consistent and also do this for allocations.

The size parameters represent the size of the memory structure, which should always be non-zero and positive.
The length parameter, on the other hand, is just the amount of time the structure is to be allocation, which should always be non-negative.
The length parameter, therefore, can be 0 and if it is then do nothing (this relaxes the parameter restrictions).
level_0/f_memory/c/memory.c
level_0/f_memory/c/memory.h