BIND 10 #2088: introduce MemorySegment class
BIND 10 Development
do-not-reply at isc.org
Tue Jul 3 00:11:22 UTC 2012
#2088: introduce MemorySegment class
-------------------------------------+-------------------------------------
Reporter: | Owner:
jinmei | Status: new
Type: task | Milestone: Next-Sprint-
Priority: | Proposed
medium | Resolution:
Component: data | Sensitive: 0
source | Sub-Project: DNS
Keywords: | Estimated Difficulty: 0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: in- |
memory NSEC |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Description changed by jinmei:
Old description:
> 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.
New description:
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 for `deallocate` 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#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list