Skip to content

Add Geometry::estimateMemorySize() API #156

@mbasmanova

Description

@mbasmanova

I'm using ESRI Geometry API to provide geospatial query support in Presto ( https://prestodb.io/ ) and I need to calculate how much memory individual Geometry objects occupy. I'm using ClassLayout.parseClass to compute the base size of an object and then add on sizes of arrays, lists, etc. I need to be able to write this code:

private static final int MULTI_POINT_IMPL_INSTANCE_SIZE = ClassLayout.parseClass(MultiPointImpl.class).instanceSize();
private static final int MULTI_PATH_IMPL_INSTANCE_SIZE = ClassLayout.parseClass(MultiPathImpl.class).instanceSize();

(see https://github.com/prestodb/presto/pull/9474/files#diff-ac9e6026ae8bd12a435b09b61a5cc0fa)

But I can't because MultiPointImpl and MultiPathImpl classes are package private.

Would it be possible to make them public?

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions