Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.
This repository was archived by the owner on Sep 13, 2022. It is now read-only.

There's no way to get the managed object size in memory #573

Closed
@almez

Description

@almez

Hi,

There is no way to get the actual (or even an approximate) size of the cached object in the memory.

The case is, we have +100 customized cache for different purposes to accelerate our platform, for each cache we have

  • Cache MaxSize
  • Cache ConsumedSize
  • Cache RemainingSize

Whenever we insert some object to be cached, we should detect its size to re-calculate aforementioned cache properties.

I know that's a complex issue and depends on many factors, so far we have some workarounds but non of them is official and we afraid to be changed in any minor or major release.

Should you add any API to get the object size in the memory ? or at least Type size and then we can add the object-specific data length.

Related Topics

Workaround 1
What Microsoft says about this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions