Extern :
- modifiche Vroni per ottimizzare memoria allocata.
This commit is contained in:
@@ -107,7 +107,7 @@ off_data* GetOffsetData(int i);
|
||||
{ \
|
||||
cur_offset_list = num_offset_list; \
|
||||
if (cur_offset_list >= max_num_offset_list) { \
|
||||
max_num_offset_list += OFFS_HALF_BLOCK_SIZE; \
|
||||
max_num_offset_list = ( cur_offset_list + 1) * 2 ; \
|
||||
gentlyResizeSTLVector(offset_list, max_num_offset_list, "offset:offset_list"); \
|
||||
} \
|
||||
++num_offset_list; \
|
||||
@@ -145,7 +145,7 @@ off_data* GetOffsetData(int i);
|
||||
#define StoreOffsetData(S, T, P) \
|
||||
{ \
|
||||
if (num_offset_data >= max_num_offset_data) { \
|
||||
max_num_offset_data += OFFS_BLOCK_SIZE; \
|
||||
max_num_offset_data = ( num_offset_data + 1) * 2 ; \
|
||||
gentlyResizeSTLVector(offset_data, max_num_offset_data, "offset:offset_data"); \
|
||||
} \
|
||||
offset_data[num_offset_data].site = S; \
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
{\
|
||||
++num_stack; \
|
||||
if (num_stack >= max_num_stack) { \
|
||||
max_num_stack += STACK_INCR; \
|
||||
max_num_stack = num_stack * 2 ; \
|
||||
stack = (STACK_TYPE*) ReallocateArray(stack, max_num_stack, sizeof(STACK_TYPE), STACK_STRING); \
|
||||
} \
|
||||
stack[num_stack] = data; \
|
||||
|
||||
@@ -93,7 +93,7 @@ inline int vroniObject::GetLoopStackElementFunc(int I)
|
||||
#define PushOntoLoopStack(E) \
|
||||
{\
|
||||
if (num_loop_stack >= max_num_loop_stack) { \
|
||||
max_num_loop_stack += DATA_BLOCK_SIZE; \
|
||||
max_num_loop_stack = ( num_loop_stack + 1) * 2; \
|
||||
loop_stack = (int*) ReallocateArray(loop_stack, max_num_loop_stack, \
|
||||
sizeof(int), "voronoi:loop_stack"); \
|
||||
} \
|
||||
@@ -156,7 +156,7 @@ inline int vroniObject::GetLoopStackElementFunc(int I)
|
||||
#define AddToPreserveBuffer(S, T) \
|
||||
{\
|
||||
if (num_preserve >= max_num_preserve) { \
|
||||
max_num_preserve += DATA_BLOCK_SIZE; \
|
||||
max_num_preserve = ( num_preserve + 1) * 2 ; \
|
||||
preserve = (preserve_buffer*) ReallocateArray(preserve, \
|
||||
max_num_preserve, \
|
||||
sizeof(preserve_buffer), \
|
||||
@@ -172,7 +172,7 @@ inline int vroniObject::GetLoopStackElementFunc(int I)
|
||||
#define AddSiteVisited(I, T) \
|
||||
{\
|
||||
if (num_visited >= max_num_visited) { \
|
||||
max_num_visited += DATA_BLOCK_SIZE; \
|
||||
max_num_visited = ( num_visited + 1 ) * 2; \
|
||||
sites_visited = (s_visited*) ReallocateArray(sites_visited, \
|
||||
max_num_visited, \
|
||||
sizeof(s_visited), \
|
||||
@@ -187,7 +187,7 @@ inline int vroniObject::GetLoopStackElementFunc(int I)
|
||||
#define AddPntVisited(I) \
|
||||
{\
|
||||
if (num_pnt_visited >= max_num_pnt_visited) { \
|
||||
max_num_pnt_visited += DATA_BLOCK_SIZE; \
|
||||
max_num_pnt_visited = ( num_pnt_visited + 1) * 2; \
|
||||
pnt_visited = (int*) ReallocateArray(pnt_visited, \
|
||||
max_num_pnt_visited, \
|
||||
sizeof(int), \
|
||||
@@ -212,7 +212,7 @@ inline int vroniObject::GetLoopStackElementFunc(int I)
|
||||
#define AddNodeChecked(I) \
|
||||
{\
|
||||
if (num_checked >= max_num_checked) { \
|
||||
max_num_checked += DATA_BLOCK_SIZE; \
|
||||
max_num_checked = ( num_checked + 1) * 2; \
|
||||
nodes_checked = (int*) ReallocateArray(nodes_checked, \
|
||||
max_num_checked, \
|
||||
sizeof(int), \
|
||||
|
||||
@@ -3107,6 +3107,11 @@ public :
|
||||
const char* GetExceptionMessage() ;
|
||||
int m_nMostViolatedRecursiveArcCount = 0 ;
|
||||
|
||||
// deallocazione memoria
|
||||
void MyFreeVDConstructionData() ;
|
||||
void apiFreeOffsetData() ;
|
||||
void apiFreeBisectorBuffer() ;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user