Opened 14 years ago
Closed 13 years ago
#1879 closed Tasks (invalid)
region allocators: auto_alloc, scoped_alloc
| Reported by: | xushiwei | Owned by: | xushiwei |
|---|---|---|---|
| Milestone: | Boost 1.36.0 | Component: | None |
| Version: | Boost 1.35.0 | Severity: | Problem |
| Keywords: | Cc: |
Change History (21)
comment:1 by , 14 years ago
comment:3 by , 14 years ago
I should have given a more complete description of reserved names: * Any identifier containing a double underscore. * Any identifier beginning with an underscore and a capital letter. * All names beginning with an underscore in the global namespace.
comment:4 by , 14 years ago
Since, stl_alloc holds a pointer to the real allocator, shouldn't
stl_alloc<void, ...> also have such a pointer and the appropriate
constructors?
You should partially specialize:
template<class Alloc>
class stl_alloc<void, Alloc> { ... };
Also, the typedefs and rebind template of stl_alloc<void, ...> should be
public.
My personal preference would be to spell out stl_allocator entirely rather
than abbreviating it to stl_alloc.
- change class name: stl_alloc -> stl_allocator
- partially specialize stl_allocator
comment:7 by , 14 years ago
- macros are all prefixed with BOOST_MEMORY to avoid conflicts.
- everything goes into namespace boost::memory, rather than directly in namespace boost.
comment:8 by , 14 years ago
1. move threadmodel, winapi to boost::detail 2. add log, debug, performance_counter to boost::detail
comment:13 by , 14 years ago
- Update GC Allocator specification. The following is minimum specification for GC Allocator:
typedef void (*DestructorType)(void* data);
concept GCAllocator
{
// Allocate memory without given a cleanup function
void* allocate(size_t cb);
// Allocate unmanaged memory with a cleanup function
void* unmanaged_alloc(size_t cb, DestructorType fn);
// Commit unmanaged memory to be managed.
void* manage(void* p, destructor_t fn);
// Deprecated: allocate memory with a cleanup function
void* allocate(size_t cb, DestructorType fn) {
return manage(unmanaged_alloc(cb, fn), fn);
}
// Cleanup and deallocate all allocated memory by this GC Allocator
void clear();
// Swap two GCAllocator instances
void swap(GCAllocator& o);
};
- testExceptionSemantics
comment:14 by , 14 years ago
1. BOOST_MEMORY_NO_STRICT_EXCEPTION_SEMANTICS. 2. gc_alloc defect: Segment fault in 64bits platform.
comment:15 by , 14 years ago
[45193]: Use std::vector instead of std::deque as PriorityQ underlying container
comment:17 by , 14 years ago
[45299]: Workaround ABA problem (http://en.wikipedia.org/wiki/ABA_problem)
comment:21 by , 13 years ago
| Resolution: | → invalid |
|---|---|
| Status: | assigned → closed |
As with #1885, this is not an appropriate use of Trac.
Note:
See TracTickets
for help on using tickets.

Changeset [44903]:
On Wed, Apr 30, 2008 at 5:09 AM, Steven Watanabe <watanabesj@gmail.com> wrote: Don't use reserved identifiers. (Any name containing a double underscore is reserved). In Christ, Steven Watanabe