github ponylang/ponyc 0.58.7

19 days ago

Make actor heap allocations more efficient by recycling freed memory

Prior to this change, the actor heap garbage collection process would return freed memory back to the pony runtime at the end of a garbage collection run. The returning of memory to the pony runtime and allocating of new memory from the pony runtime are both expensive operations. This change makes it so that the actor garbage collection process keeps old freed memory chunks around with the expectation that the actor will very likely need memory again as it continues to run behaviors. This avoids the expensive return to and reallocation of memory from the pony runtime. It is possible that the overall application might end up using more memory as any freed memory chunks can only be reused by the actor that owns them and the runtime and other actors can no longer reuse that memory as they previously might have been able to.

Correctly find custom-built llc during build process

Previously our CMake build was failing to find our custom-built llc binary, but builds worked by accident if there was a system llc. The build system now finds our custom llc correctly.

Fix minor buffer out of bounds access bug in compiler

Previously, the compiler error reporting had a minor buffer out of bounds access bug where it read one byte past the end of a buffer as part of an if condition before checking that the offset was smaller than the buffer length. This was fixed by switching the order of the if condition checks so that the check that the offset is smaller than the buffer length happens before reading the value from the buffer to prefer the out of bounds access issue.

Fix bug in ASIO shutdown

There was a bug during our shutdown process that could cause a segmentation fault coming from our asynchrnous I/O subsystem. This has been fixed.

Fix early quiescence/termination bug

Previously, the logic to detect quiescence had a race condition in relation to dynamic scheduler scaling and it was possible for the runtime to incorrectly detect quiescence and termninate early if a scheduler thread suspended at just the right time.

We have now changed the quiescence logic to keep an accurate track of exactly how many scheduler threads are active at the time the quiescence detection protocol begins so it can ensure that any scheduler threads suspending or unsuspending can no longer cause an incorrect determination that might lead to early termination of the runtime.

[0.58.7] - 2024-11-30

Fixed

  • Correctly find custom-built llc (PR #4537)
  • Fix buffer out of bounds access issue (PR #4540)
  • Fix bug in ASIO shutdown (PR #4548)
  • Fix early quiescence/termination bug (PR #4550)

Changed

  • Recycle actor heap chunks after GC instead of returning to pool (PR #4531)

Don't miss a new ponyc release

NewReleases is sending notifications on new releases.