commit | 9a3565ddc1e956ef1f52806093e949c7809f6e79 | [log] [tgz] |
---|---|---|
author | Tommi Rantala <tt.rantala@gmail.com> | Wed Sep 19 14:00:20 2012 +0300 |
committer | Tommi Rantala <tt.rantala@gmail.com> | Fri Sep 28 13:52:22 2012 +0300 |
tree | 083806a7ef8c213db6f9a8cbf292f24e33c17b27 | |
parent | 26fc1563fba945d0356e4a7dd935a6a57b3c03db [diff] |
Simplify `sos_alloc()' implementation Instead of maintaining a pointer to the `sos_memory' array, maintain an index that tells the next free position. When atomic operations are available, the allocation boils down to a single fetch-and-add operation.