Further improvements to memory.c. (#1625)
authoroon3m0oo <oon3m0oo@users.noreply.github.com>
Wed, 20 Jun 2018 20:04:03 +0000 (21:04 +0100)
committerMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Wed, 20 Jun 2018 20:04:03 +0000 (22:04 +0200)
commita399d004257b2f43e8211341f924f3a73171b98c
tree5ad0a839a9befa14a457b971014f52f2c3097bd2
parentf66b9c88267b26bd1322de9c1dc77c1716e91940
Further improvements to memory.c. (#1625)

- Compiler TLS is now used only used when the compiler supports it
- If compiler TLS is unsupported, we use platform-specific TLS
- Only one variable (an index) is now in TLS
- We only access TLS once per alloc, and never when freeing
- Allocation / release info is now stored within the allocation itself, by
  over-allocating; this saves having external structures do the bookkeeping, and
  reduces some of the redundant data that was being stored (such as addresses)
- We never hit the alloc lock when not using SMP or when using OpenMP (that was
  my fault)
- Now that there are fewer tracking structures I think this is a bit easier to
  read than before
driver/others/memory.c