Skip to content

Commit 4dff816

Browse files
committed
Revert "Test statically allocated"
This reverts commit 989fa8e.
1 parent 989fa8e commit 4dff816

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

Include/internal/pycore_interp_structs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ struct _is {
900900
struct _qsbr_shared qsbr;
901901

902902
#ifdef _Py_TIER2
903-
struct _PyUOpInstruction jit_uop_buffer[UOP_MAX_TRACE_LENGTH];
903+
struct _PyUOpInstruction *jit_uop_buffer;
904904
#endif
905905

906906
#if defined(Py_GIL_DISABLED)

Python/optimizer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,14 +1281,12 @@ uop_optimize(
12811281
_PyBloomFilter dependencies;
12821282
_Py_BloomFilter_Init(&dependencies);
12831283
PyInterpreterState *interp = _PyInterpreterState_GET();
1284-
/**
12851284
if (interp->jit_uop_buffer == NULL) {
12861285
interp->jit_uop_buffer = (_PyUOpInstruction *)PyMem_RawMalloc(UOP_MAX_TRACE_LENGTH*sizeof(_PyUOpInstruction));
12871286
if (interp->jit_uop_buffer == NULL) {
12881287
return 0;
12891288
}
12901289
}
1291-
**/
12921290
_PyUOpInstruction *buffer = interp->jit_uop_buffer;
12931291
OPT_STAT_INC(attempts);
12941292
char *env_var = Py_GETENV("PYTHON_UOPS_OPTIMIZE");

Python/pystate.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ init_interpreter(PyInterpreterState *interp,
559559

560560
#ifdef _Py_TIER2
561561
// Ensure the buffer is to be set as NULL.
562-
// interp->jit_uop_buffer = NULL;
562+
interp->jit_uop_buffer = NULL;
563563
#endif
564564
llist_init(&interp->mem_free_queue.head);
565565
llist_init(&interp->asyncio_tasks_head);
@@ -808,12 +808,10 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
808808

809809
#ifdef _Py_TIER2
810810
_Py_ClearExecutorDeletionList(interp);
811-
/**
812811
if (interp->jit_uop_buffer != NULL) {
813812
PyMem_RawFree(interp->jit_uop_buffer);
814813
interp->jit_uop_buffer = NULL;
815814
}
816-
**/
817815
#endif
818816
_PyAST_Fini(interp);
819817
_PyAtExit_Fini(interp);

0 commit comments

Comments
 (0)