Buffer Fragmentation and Challenges #30
Replies: 2 comments
-
|
I believe there is an issue with the timestamp bytes in challenge 1. If we read it as double from the buffer, then it produces 1701896373.429757, the integer part is nowhere near the expected timestamp 1672531200000. Even if you create fractional part to integer it still is not close enough. However, if you use these bytes: const b = Buffer.alloc(8);
b.writeDoubleBE(1672531200000, 0);
console.log(b) |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I'm struggling with the Challenge #2, specially with the second part, the copy script simply doesn't collect the 50MB file after the copy allocation with the global.gc() and --expose-gc flag. I've tried some intervals and other changes in the code, but nothing worked: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Buffer Fragmentation and Challenges
Understanding memory fragmentation, challenges with buffer management, and solutions for optimal performance.
https://www.thenodebook.com/buffers/fragmentation-and-challenges
Beta Was this translation helpful? Give feedback.
All reactions