]> Kevux Git Server - fll/commit
Update: Add restrict optimization to f_memory functions.
authorKevin Day <kevin@kevux.org>
Fri, 9 Feb 2024 03:55:08 +0000 (21:55 -0600)
committerKevin Day <kevin@kevux.org>
Fri, 9 Feb 2024 04:22:24 +0000 (22:22 -0600)
commitf351ee5711680eda0ab5e8a005e12702af400a47
treef2c89579503674c4cf423de59b51e21be1c1456b
parentc94811570270c7f87011069e74009ca4613d7d74
Update: Add restrict optimization to f_memory functions.

The design of the memory operations require that array, used, and size do not point to the same memory address.
Help prevent potential aliasing by adding restrict keyword.
The functions with only a single pointer in its parameters still has the restrict keyword added.

I opted to avoid adding the restrict keyword to some of the append and append all functions.
Those would require more attention before I am certain whether or not they should be allowed to have overlapping addresses.
I think they should not, but just in case, I put doing that on hold.

The callback could also use restrict but I have decided not to do that as well due to the number of files that I will need to change.
I will do this later.
level_0/f_memory/c/memory.c
level_0/f_memory/c/memory.h
level_0/f_memory/c/memory/array.c
level_0/f_memory/c/memory/array.h
level_0/f_memory/c/memory/arrays.c
level_0/f_memory/c/memory/arrays.h
level_0/f_memory/c/memory/private-array.c
level_0/f_memory/c/memory/private-array.h