Skip to content

mw:com: Revisit usage of static counter increment in my_bounded_memory_resource.h #535

@KrishaDeshkool

Description

@KrishaDeshkool

What

Background:
While adding new tests for proxy method handling, it was found that that some new tests could cause existing ones to fail because of MemoryResourceIdentifier collisions in the registry map. The fake bounded memory resource uses a static counter that increments every time a new fake memory resource is created, but FakeMockedServiceData was still using hardcoded IDs 10 and 11. Once the counter reached those values, both paths tried to register the same IDs, which triggered the test failures.

As a short term fix, these hardcoded IDs were bumped to take max values in this PR

This ticket is create so we can come up with a robust fix.

How

Re-evaluate the usage of static counters and design an API with which user can inject the ID directly.

Estimates for realization

TBD

Category

  • Affects Detailed Design

Requirements / Architecture

  • Requirements / Architecture are not affected by this change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions