mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Task doesn't like out-of-order frees, so for the sake of the POC, just use malloc/free
This commit is contained in:
@@ -1112,8 +1112,7 @@ void TaskDependencyStatusRecord::performEscalationAction(
|
||||
/**************************************************************************/
|
||||
|
||||
void AsyncTask::pushTimeSpentRunningRecord(void) {
|
||||
void *allocation = _swift_task_alloc_specific(
|
||||
this, sizeof(class TimeSpentRunningStatusRecord));
|
||||
void *allocation = std::malloc(sizeof(class TimeSpentRunningStatusRecord));
|
||||
auto record = ::new (allocation) TimeSpentRunningStatusRecord();
|
||||
|
||||
addStatusRecord(this, record,
|
||||
@@ -1125,7 +1124,7 @@ void AsyncTask::pushTimeSpentRunningRecord(void) {
|
||||
void AsyncTask::popTimeSpentRunningRecord(void) {
|
||||
if (auto record = popStatusRecordOfType<TimeSpentRunningStatusRecord>(this)) {
|
||||
record->~TimeSpentRunningStatusRecord();
|
||||
_swift_task_dealloc_specific(this, record);
|
||||
std::free(record);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user