Add postcode boundary calculation
This commit is contained in:
parent
f9bd218a3e
commit
f5e6894c0f
14 changed files with 1384 additions and 717 deletions
11
pipeline/transform/postcode_boundaries/memory.py
Normal file
11
pipeline/transform/postcode_boundaries/memory.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import ctypes
|
||||
import gc
|
||||
|
||||
|
||||
def release_memory() -> None:
|
||||
"""Force Python + glibc to release freed memory back to the OS."""
|
||||
gc.collect()
|
||||
try:
|
||||
ctypes.CDLL("libc.so.6").malloc_trim(0)
|
||||
except OSError:
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue