Skip to content

over estimate size of array #2

@oucyang

Description

@oucyang

next code will over estimate size of array, for example, object A contains array B, C is one element of B。 If C contains A, then, estimate C will get the over size.

private def visitArray(array: AnyRef, cls: Class[_], state: SearchState) {
...
        for (i <- 0 until ARRAY_SAMPLE_SIZE) {
          val elem = JArray.get(array, rand.nextInt(length))
size += SizeEstimator.estimate(elem, state.visited)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions