Skip to content

Implement memory_usage() for major jiff types.#521

Open
inklesspen wants to merge 3 commits intoBurntSushi:masterfrom
inklesspen:memory_usage
Open

Implement memory_usage() for major jiff types.#521
inklesspen wants to merge 3 commits intoBurntSushi:masterfrom
inklesspen:memory_usage

Conversation

@inklesspen
Copy link

These routines give the heap usage by these types, which can be useful when tracking cache sizes.

I did not implement the routine for formatting/rounding/etc types, since these seem unlikely to be held in caches.

Fixes #520.

These routines give the heap usage by these types, which can be useful when tracking cache sizes.

I did not implement the routine for formatting/rounding/etc types, since these seem unlikely to be held in caches.

Fixes BurntSushi#520.
@BurntSushi
Copy link
Owner

Thanks!

I don't think we need to add this for Copy types.

@inklesspen
Copy link
Author

That's fair!

Also I guess I misunderstood how the each! macro would work? I thought std would always be available if alloc was available. But perhaps it's the other way round.

@BurntSushi
Copy link
Owner

Right. std implies alloc.

@inklesspen
Copy link
Author

Let me know if you want me to squash down the three commits; otherwise I'll assume the current PR state is fine.

@inklesspen
Copy link
Author

Is there anything further you need to allow this to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add (optional) support for typesize

2 participants