Skip to content

Commit

Permalink
- Use boehm GC for HPCOM pthreads
Browse files Browse the repository at this point in the history
- Don't use boehm GC, but rather the chosen allocation scheme for create_index_spec


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18322 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 27, 2013
1 parent abf6fc4 commit 2647c7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenC.tpl
Expand Up @@ -597,7 +597,7 @@ template simulationFile(SimCode simCode, String guid)
int res;
DATA data;
<%symbolName(modelNamePrefixStr,"setupDataStruc")%>(&data);
<%if Flags.isSet(HPCOM) then 'omc_alloc_interface = omc_alloc_interface_pooled;<%\n%>'%>omc_alloc_interface.init();
<%if boolAnd(Flags.isSet(HPCOM), boolNot(stringEq(getConfigString(HPCOM_CODE),"pthreads_spin"))) then 'omc_alloc_interface = omc_alloc_interface_pooled;<%\n%>'%>omc_alloc_interface.init();
res = _main_SimulationRuntime(argc, argv, &data);
return res;
}
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/c/util/index_spec.c
Expand Up @@ -103,7 +103,7 @@ void create_index_spec(index_spec_t* dest, int nridx, ...)
dest->ndims = nridx;
dest->dim_size = size_alloc(nridx);
dest->index = index_alloc(nridx);
dest->index_type = (char*)GC_malloc_atomic(nridx+1);
dest->index_type = (char*)generic_alloc(nridx+1,sizeof(char));
for(i = 0; i < nridx; ++i) {
dest->dim_size[i] = va_arg(ap, _index_t);
dest->index[i] = va_arg(ap, _index_t*);
Expand Down

0 comments on commit 2647c7f

Please sign in to comment.