microsoft / microsoft/STL

LWG-3120 Unclear behavior of `monotonic_buffer_resource::release()`

Open
#1,468 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

LWG vNext
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

LWG-3120 Unclear behavior of monotonic_buffer_resource::release()

This adds the following Standardese:

Effects: Calls upstream_rsrc->deallocate() as necessary to release all allocated memory. Resets current_buffer and next_buffer_size to their initial values at construction.

Our current implementation doesn't appear to do that:

https://github.com/microsoft/STL/blob/9959929c77b18e25b6dfbc8886e311b913321925/stl/inc/memory_resource#L636-L656

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in stl/inc/memory_resource at the monotonic_buffer_resource::release() implementation linked in the issue. Compare its behavior with the LWG-3120 Effects wording, focusing on current_buffer and next_buffer_size. Done means release deallocates the allocated memory and restores both values to their construction-time initial state.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.