Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92350877
aka_memory.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 19, 14:57
Size
1 KB
Mime Type
text/x-c
Expires
Thu, Nov 21, 14:57 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22366700
Attached To
rAKA akantu
aka_memory.cc
View Options
/**
* @file aka_memory.cpp
* @author Nicolas Richart <nicolas.richart@epfl.ch>
* @date Tue Jun 15 11:15:53 2010
*
* @brief static memory wrapper
*
* @section LICENSE
*
* \<insert license here\>
*
*/
/* -------------------------------------------------------------------------- */
#include "aka_memory.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_AKANTU__
/* -------------------------------------------------------------------------- */
Memory
::
Memory
(
MemoryID
memory_id
)
{
static_memory
=
StaticMemory
::
getStaticMemory
();
this
->
memory_id
=
memory_id
;
}
/* -------------------------------------------------------------------------- */
Memory
::~
Memory
()
{
if
(
StaticMemory
::
isInstantiated
())
{
std
::
list
<
VectorID
>::
iterator
it
;
for
(
it
=
handeld_vectors_id
.
begin
();
it
!=
handeld_vectors_id
.
end
();
++
it
)
{
AKANTU_DEBUG
(
dblAccessory
,
"Deleting the vector "
<<
*
it
);
static_memory
->
sfree
(
memory_id
,
*
it
);
}
}
handeld_vectors_id
.
clear
();
static_memory
->
destroy
();
static_memory
=
NULL
;
}
/* -------------------------------------------------------------------------- */
__END_AKANTU__
Event Timeline
Log In to Comment