Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9a44e7a
Look up the current interpreter in PyObject_Malloc().
ericsnowcurrently Oct 5, 2022
16cd128
Move the low-level allocator implementations to a header file.
ericsnowcurrently Oct 6, 2022
737877c
Move the top-level allocators state.
ericsnowcurrently Oct 6, 2022
6dd7ba5
Move the allocators to the runtime state.
ericsnowcurrently Oct 6, 2022
56251cb
Drop debug code.
ericsnowcurrently Oct 6, 2022
007eed4
Move the top-level object allocator to the runtime state.
ericsnowcurrently Oct 6, 2022
38a80d8
Move the arenas state to the runtime state.
ericsnowcurrently Oct 7, 2022
83d397f
Pass the context to initializers explicitly.
ericsnowcurrently Oct 7, 2022
991dfc8
Move the allocator groupings to pycore_allocators.h.
ericsnowcurrently Nov 8, 2022
ac5cfb0
Move the arena allocator to pycore_pymem_init.h.
ericsnowcurrently Nov 8, 2022
9f32218
Add a NEWS entry.
ericsnowcurrently Nov 7, 2022
e5fc139
Move the object allocator definitions to pycore_obmalloc*.h.
ericsnowcurrently Nov 8, 2022
d61b410
pycore_allocators.h -> pycore_pymem_allocators.h
ericsnowcurrently Nov 8, 2022
0efcef7
Move the arena allocator impl to its own file.
ericsnowcurrently Nov 8, 2022
ec01f99
Move _Py_GetAllocatedBlocks() over.
ericsnowcurrently Nov 8, 2022
a1ff9b0
Move _PyObject_DebugMallocStat() over.
ericsnowcurrently Nov 8, 2022
3172cbe
Restore uint for obmalloc.
ericsnowcurrently Nov 8, 2022
adc60e2
Do not define the functions in header files.
ericsnowcurrently Nov 9, 2022
5262207
Drop pycore_*_allocators.h.
ericsnowcurrently Nov 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pycore_allocators.h -> pycore_pymem_allocators.h
  • Loading branch information
ericsnowcurrently committed Nov 8, 2022
commit d61b4101c4b5e6ff0827bb13008ebea8c07bf979
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef Py_INTERNAL_ALLOCATORS_H
#define Py_INTERNAL_ALLOCATORS_H
#ifndef Py_INTERNAL_PYMEM_ALLOCATORS_H
#define Py_INTERNAL_PYMEM_ALLOCATORS_H
#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -102,4 +102,4 @@ void _PyMem_DebugFree(void *ctx, void *p);
#ifdef __cplusplus
}
#endif
#endif /* !Py_INTERNAL_ALLOCATORS_H */
#endif /* !Py_INTERNAL_PYMEM_ALLOCATORS_H */
2 changes: 1 addition & 1 deletion Include/internal/pycore_pymem_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif

#include "pycore_allocators.h"
#include "pycore_pymem_allocators.h"


/********************************/
Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/cpython/weakrefobject.h \
\
$(srcdir)/Include/internal/pycore_abstract.h \
$(srcdir)/Include/internal/pycore_allocators.h \
$(srcdir)/Include/internal/pycore_asdl.h \
$(srcdir)/Include/internal/pycore_ast.h \
$(srcdir)/Include/internal/pycore_ast_state.h \
Expand Down Expand Up @@ -1659,6 +1658,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_pyhash.h \
$(srcdir)/Include/internal/pycore_pylifecycle.h \
$(srcdir)/Include/internal/pycore_pymem.h \
$(srcdir)/Include/internal/pycore_pymem_allocators.h \
$(srcdir)/Include/internal/pycore_pymem_init.h \
$(srcdir)/Include/internal/pycore_pystate.h \
$(srcdir)/Include/internal/pycore_range.h \
Expand Down
2 changes: 1 addition & 1 deletion Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "pycore_code.h" // stats
#include "pycore_pystate.h" // _PyInterpreterState_GET
#include "pycore_pymem.h"
#include "pycore_allocators.h"
#include "pycore_pymem_allocators.h"

#include <stdbool.h>

Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
<ClInclude Include="..\Include\frameobject.h" />
<ClInclude Include="..\Include\import.h" />
<ClInclude Include="..\Include\internal\pycore_abstract.h" />
<ClInclude Include="..\Include\internal\pycore_allocators.h" />
<ClInclude Include="..\Include\internal\pycore_asdl.h" />
<ClInclude Include="..\Include\internal\pycore_ast.h" />
<ClInclude Include="..\Include\internal\pycore_ast_state.h" />
Expand Down Expand Up @@ -240,6 +239,7 @@
<ClInclude Include="..\Include\internal\pycore_pyhash.h" />
<ClInclude Include="..\Include\internal\pycore_pylifecycle.h" />
<ClInclude Include="..\Include\internal\pycore_pymem.h" />
<ClInclude Include="..\Include\internal\pycore_pymem_allocators.h" />
<ClInclude Include="..\Include\internal\pycore_pymem_init.h" />
<ClInclude Include="..\Include\internal\pycore_pystate.h" />
<ClInclude Include="..\Include\internal\pycore_range.h" />
Expand Down
6 changes: 3 additions & 3 deletions PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,6 @@
<ClInclude Include="..\Include\internal\pycore_abstract.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_allocators.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_asdl.h">
<Filter>Include\internal</Filter>
</ClInclude>
Expand Down Expand Up @@ -624,6 +621,9 @@
<ClInclude Include="..\Include\internal\pycore_pymem.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_pymem_allocators.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_pymem_init.h">
<Filter>Include\internal</Filter>
</ClInclude>
Expand Down