MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / _collect_memory

Method _collect_memory

datastudio/models/base.py:87–95  ·  view source on GitHub ↗

Run garbage collection and optionally trim glibc malloc arenas. Args: trim: If True, call malloc_trim(0) to return freed memory to the OS.

(trim: bool = False)

Source from the content-addressed store, hash-verified

85
86 @staticmethod
87 def _collect_memory(trim: bool = False):
88 """Run garbage collection and optionally trim glibc malloc arenas.
89
90 Args:
91 trim: If True, call malloc_trim(0) to return freed memory to the OS.
92 """
93 gc.collect()
94 if trim:
95 _malloc_trim(0)
96
97 @staticmethod
98 def _clear_message_buffers(messages):

Callers 2

generateMethod · 0.95
generateMethod · 0.80

Calls 1

_malloc_trimFunction · 0.85

Tested by

no test coverage detected