node icon indicating copy to clipboard operation
node copied to clipboard

[v25.x] v8: changing total_allocated_bytes to avoid ABI changes

Open caiolima opened this issue 1 month ago • 5 comments

As noted by @targos in https://github.com/nodejs/node/pull/60429#issuecomment-3547655449, the implementation of total_allocated_bytes changes the ABI. This PR changes original V8 implementation to a version where there's no addition of HeapStatistics::total_allocated_bytes_ to V8's HeapStatistics, and instead we get such values using Isolate::GetTotalAllocatedBytes. This also changes code introduced by https://github.com/nodejs/node/pull/60573 to use this new API on either v8.getHeapStatistics() and Worker::GetHeapStatistics. The goal here is to make total_allocated_bytes back portable to previous versions, but keeping the v8.getHeapStatistics() API stable once users transition from v25 to future versions. It also solves the ABI change introduced by https://github.com/nodejs/node/pull/60429/files

There's also a fix on documentation text with missing . and updating the code snippet to include total_allocated_bytes on output.

caiolima avatar Nov 21 '25 14:11 caiolima

Review requested:

  • [ ] @nodejs/gyp
  • [ ] @nodejs/security-wg
  • [ ] @nodejs/v8-update

nodejs-github-bot avatar Nov 21 '25 14:11 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/70277/

nodejs-github-bot avatar Nov 23 '25 00:11 nodejs-github-bot

Hi all, could someone help me trigger CI again, please?

caiolima avatar Nov 25 '25 11:11 caiolima

Up

caiolima avatar Dec 01 '25 15:12 caiolima

CI: https://ci.nodejs.org/job/node-test-pull-request/70419/

nodejs-github-bot avatar Dec 08 '25 11:12 nodejs-github-bot

I'm getting permission errors to look what is failing on CI. Probably it already expired. Does any of you have permission to see what's failing?

caiolima avatar Dec 17 '25 11:12 caiolima