A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/062846.html below:

[Python-Dev] Prevalence of low-level memory abuse?

[Python-Dev] Prevalence of low-level memory abuse? [Python-Dev] Prevalence of low-level memory abuse?Tim Peters tim.peters at gmail.com
Mon Mar 27 01:58:02 CEST 2006
[Edward Loper]
> Could the debug build's macros for PyMem/PyObject_new/free be modified
> to check for mismatches?  Or would storing information about which
> method was used to allocate each pointer be too expensive?  Perhaps a
> special build could be used to check for mismatches?

It's partly possible (e.g., it's impossible to know whether a blob of
memory was obtained by calling malloc() directly).

If someone wants to do it (I do not), the debug build adds 8 bytes to
each side of each memory block obtained via each PyMem and PyObject
malloc/realloc call, and one of the (current) 8 FORBIDDEN_BYTEs could
be used to store flags without significant loss of functionality.  It
would make a decent enhancement.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4