DKerp / get-size

Determine the size in bytes an object occupies inside RAM.
MIT License
22 stars 12 forks source link

Fix incorrect heap size value for boxed slice #13

Open CeleritasCelery opened 1 year ago

CeleritasCelery commented 1 year ago

Previously the GetSize impl for a boxed slice didn't have a bound on T, so get_size was being called on &T instead of T. This meant that the size of each element was always being calculated to the size of a reference. This change fixes that and adds a test.

CeleritasCelery commented 8 months ago

@DKerp ping

bircni commented 1 month ago

@CeleritasCelery Ping

CeleritasCelery commented 1 month ago

Hey @bircni Thanks for taking ownership of this code! I am going to switch to using get-size2 since it has this fix among other improvements.

bircni commented 1 month ago

No Problem @CeleritasCelery please feel free to raise other issues or pull requests !

bircni commented 1 month ago

the next version I publish will include your changes!

bircni commented 1 month ago

Also opened an issue here: https://github.com/rustsec/advisory-db/issues/2078