Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68961264
test_static_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
Sat, Jun 29, 16:25
Size
847 B
Mime Type
text/x-c
Expires
Mon, Jul 1, 16:25 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18653530
Attached To
rAKA akantu
test_static_memory.cc
View Options
/**
* @file test/static_memory.cc
* @author Nicolas Richart <nicolas.richart@epfl.ch>
* @date Fri Jun 11 11:55:54 2010
*
* @brief unit test for the StaticMemory class
*
*/
/* -------------------------------------------------------------------------- */
#include <iostream>
/* -------------------------------------------------------------------------- */
#include "aka_static_memory.hh"
#include "aka_vector.hh"
/* -------------------------------------------------------------------------- */
int
main
(
int
argc
,
char
*
argv
[])
{
akantu
::
StaticMemory
*
st_mem
=
akantu
::
StaticMemory
::
getStaticMemory
();
akantu
::
Vector
<
int
>
&
test_int
=
st_mem
->
smalloc
<
int
>
(
0
,
"test_int"
,
1000
,
3
);
test_int
.
resize
(
1050
);
test_int
.
resize
(
2000
);
std
::
cout
<<
*
st_mem
<<
std
::
endl
;
st_mem
->
sfree
(
0
,
"test_int"
);
exit
(
EXIT_SUCCESS
);
}
Event Timeline
Log In to Comment