BIND 10 #2088: introduce MemorySegment class
BIND 10 Development
do-not-reply at isc.org
Fri Jun 29 08:46:49 UTC 2012
#2088: introduce MemorySegment class
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: task | Status: new
Priority: medium | Milestone: Next-
Component: data source | Sprint-Proposed
Sensitive: 0 | Keywords:
Sub-Project: DNS | Defect Severity: N/A
Estimated Difficulty: 0 | Feature Depending on Ticket: in-
Total Hours: 0 | memory NSEC
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
We'll use this so we can use various types of memory segment ('local',
'shared memory', 'mmap) transparently.
- define an abstract base class. We only need the simplest allocator
and deallocator:
{{{#!cpp
void* allocate(size_t size);
void deallocate(void* ptr, size_t size);
}}};
(note: the size parameter is not mandatory functionality-wise, but
we'll need this if we want to detect memory
it'd also be better to have "allMemoryDeallocated" for memory leak
detection
- define and implement LocalMemorySegment derived class.
It internally uses malloc/free or new/delete. not sure this
should be a "nothrow" version (probably not, but think about it)
No dependency. Can start anytime.
--
Ticket URL: <http://bind10.isc.org/ticket/2088>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list