Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Koch
dune-common
Commits
92a6d42b
Commit
92a6d42b
authored
12 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
[doc]
add documentation for allocators [[Imported from SVN: r7018]]
parent
aba32344
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/doxygen/modules
+6
-0
6 additions, 0 deletions
doc/doxygen/modules
dune/common/debugallocator.hh
+22
-1
22 additions, 1 deletion
dune/common/debugallocator.hh
dune/common/mallocallocator.hh
+4
-1
4 additions, 1 deletion
dune/common/mallocallocator.hh
with
32 additions
and
2 deletions
doc/doxygen/modules
+
6
−
0
View file @
92a6d42b
/**
@defgroup Common Common (foundation classes)
*/
/**
@defgroup Allocators Allocators
@brief Implementations of the STL allocator concept
@ingroup Common
*/
This diff is collapsed.
Click to expand it.
dune/common/debugallocator.hh
+
22
−
1
View file @
92a6d42b
...
...
@@ -21,6 +21,8 @@ enum DummyProtFlags { PROT_NONE, PROT_WRITE, PROT_READ };
namespace
Dune
{
#ifndef DOXYGEN // hide implementation details from doxygen
namespace
DebugMemory
{
...
...
@@ -177,7 +179,8 @@ namespace Dune
#undef ALLOCATION_ASSERT
extern
AllocationManager
alloc_man
;
}
}
// end namespace DebugMemory
#endif // DOXYGEN
template
<
class
T
>
class
DebugAllocator
;
...
...
@@ -196,6 +199,24 @@ namespace Dune
};
// actual implementation
/**
@ingroup Allocators
@brief Allocators implementation which performs different kind of memory checks
We check:
- access past the end
- only free memory which was allocated with this allocator
- list allocated memory chunks still in use upon destruction of the allocator
When defining DEBUG_ALLOCATOR_KEEP to 1, we also check
- double free
- access after free
When defining DEBUG_NEW_DELETE >= 1, we
- overload new/delte
- use the Debug memory management for new/delete
- DEBUG_NEW_DELETE > 2 gives extensive debug output
*/
template
<
class
T
>
class
DebugAllocator
{
public:
...
...
This diff is collapsed.
Click to expand it.
dune/common/mallocallocator.hh
+
4
−
1
View file @
92a6d42b
...
...
@@ -9,7 +9,10 @@
namespace
Dune
{
//! allocator which simply calls malloc/free
/**
@ingroup Allocators
@brief Allocators implementation which simply calls malloc/free
*/
template
<
class
T
>
class
MallocAllocator
{
public:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment