1369 lines
126 KiB
XML
1369 lines
126 KiB
XML
|
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||
|
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.6">
|
||
|
<compounddef id="memory-manager_8hpp" kind="file">
|
||
|
<compoundname>memory-manager.hpp</compoundname>
|
||
|
<includedby refid="kernel_8hh" local="no">/usr/include/gecode/kernel.hh</includedby>
|
||
|
<invincdepgraph>
|
||
|
<node id="27619">
|
||
|
<label>/usr/include/gecode/int/nvalues/int-base.hpp</label>
|
||
|
<link refid="nvalues_2int-base_8hpp_source"/>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27602">
|
||
|
<label>/usr/include/gecode/int/arithmetic.hh</label>
|
||
|
<link refid="int_2arithmetic_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27627">
|
||
|
<label>/usr/include/gecode/int/view/scale.hpp</label>
|
||
|
<link refid="int_2view_2scale_8hpp_source"/>
|
||
|
<childnode refid="27628" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27625">
|
||
|
<label>/usr/include/gecode/int/div.hh</label>
|
||
|
<link refid="div_8hh_source"/>
|
||
|
<childnode refid="27626" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27627" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27626">
|
||
|
<label>/usr/include/gecode/int/arithmetic/mult.hpp</label>
|
||
|
<link refid="int_2arithmetic_2mult_8hpp_source"/>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27579">
|
||
|
<label>/usr/include/gecode/flatzinc.hh</label>
|
||
|
<link refid="flatzinc_8hh_source"/>
|
||
|
<childnode refid="27580" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27581" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27608">
|
||
|
<label>/usr/include/gecode/int/gcc/post.hpp</label>
|
||
|
<link refid="int_2gcc_2post_8hpp_source"/>
|
||
|
<childnode refid="27609" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27657">
|
||
|
<label>/usr/include/gecode/minimodel.hh</label>
|
||
|
<link refid="minimodel_8hh_source"/>
|
||
|
<childnode refid="27658" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27645">
|
||
|
<label>/usr/include/gecode/int/dom/range.hpp</label>
|
||
|
<link refid="range_8hpp_source"/>
|
||
|
<childnode refid="27629" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27653">
|
||
|
<label>/usr/include/gecode/int/cumulative.hh</label>
|
||
|
<link refid="cumulative_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27654">
|
||
|
<label>/usr/include/gecode/int/unary.hh</label>
|
||
|
<link refid="unary_8hh_source"/>
|
||
|
<childnode refid="27653" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27637">
|
||
|
<label>/usr/include/gecode/int/no-overlap.hh</label>
|
||
|
<link refid="no-overlap_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27651">
|
||
|
<label>/usr/include/gecode/int/support-values.hh</label>
|
||
|
<link refid="support-values_8hh_source"/>
|
||
|
<childnode refid="27626" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27617">
|
||
|
<label>/usr/include/gecode/int/cumulatives.hh</label>
|
||
|
<link refid="cumulatives_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27660">
|
||
|
<label>/usr/include/gecode/set/channel.hh</label>
|
||
|
<link refid="set_2channel_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27618">
|
||
|
<label>/usr/include/gecode/int/distinct.hh</label>
|
||
|
<link refid="int_2distinct_8hh_source"/>
|
||
|
<childnode refid="27614" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27615" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27608" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27619" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27620" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27621" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27622" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27623" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27595">
|
||
|
<label>/usr/include/gecode/gist/mainwindow.hh</label>
|
||
|
<link refid="mainwindow_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27685">
|
||
|
<label>/usr/include/gecode/search/sequential/bab.hh</label>
|
||
|
<link refid="sequential_2bab_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27674">
|
||
|
<label>/usr/include/gecode/set/rel.hh</label>
|
||
|
<link refid="set_2rel_8hh_source"/>
|
||
|
<childnode refid="27662" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27631" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27672" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27673" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27675" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27664">
|
||
|
<label>/usr/include/gecode/set/int.hh</label>
|
||
|
<link refid="set_2int_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27600">
|
||
|
<label>/usr/include/gecode/gist/preferences.hh</label>
|
||
|
<link refid="preferences_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27647">
|
||
|
<label>/usr/include/gecode/int/member/prop.hpp</label>
|
||
|
<link refid="member_2prop_8hpp_source"/>
|
||
|
<childnode refid="27636" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27632">
|
||
|
<label>/usr/include/gecode/int/exec.hh</label>
|
||
|
<link refid="exec_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27592">
|
||
|
<label>/usr/include/gecode/gist/nodecursor.hh</label>
|
||
|
<link refid="nodecursor_8hh_source"/>
|
||
|
<childnode refid="27591" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27590" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27639">
|
||
|
<label>/usr/include/gecode/int/rel.hh</label>
|
||
|
<link refid="int_2rel_8hh_source"/>
|
||
|
<childnode refid="27640" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27641" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27642" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27643" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27644" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27618" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27645" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27629" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27646" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27630" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27633" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27647" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27648" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27610" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27649" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27620" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27621" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27622" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27650" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27623" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27658">
|
||
|
<label>/usr/include/gecode/driver.hh</label>
|
||
|
<link refid="driver_8hh_source"/>
|
||
|
<childnode refid="27579" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27589">
|
||
|
<label>/usr/include/gecode/gist/visualnode.hh</label>
|
||
|
<link refid="visualnode_8hh_source"/>
|
||
|
<childnode refid="27590" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27592" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27593" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27597" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27641">
|
||
|
<label>/usr/include/gecode/int/arithmetic/nroot.hpp</label>
|
||
|
<link refid="nroot_8hpp_source"/>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27582">
|
||
|
<label>/usr/include/gecode/float.hh</label>
|
||
|
<link refid="float_8hh_source"/>
|
||
|
<childnode refid="27583" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27584" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27585" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27586" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27686">
|
||
|
<label>/usr/include/gecode/search/sequential/dfs.hh</label>
|
||
|
<link refid="sequential_2dfs_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27640">
|
||
|
<label>/usr/include/gecode/int/arithmetic/max.hpp</label>
|
||
|
<link refid="max_8hpp_source"/>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27636">
|
||
|
<label>/usr/include/gecode/int/member.hh</label>
|
||
|
<link refid="member_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27580">
|
||
|
<label>/usr/include/gecode/flatzinc/parser.hh</label>
|
||
|
<link refid="parser_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27678">
|
||
|
<label>/usr/include/gecode/search.hh</label>
|
||
|
<link refid="search_8hh_source"/>
|
||
|
<childnode refid="27658" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27599" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27679" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27687" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27681" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27680" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27685" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27686" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27684" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27689" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27690" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27594">
|
||
|
<label>/usr/include/gecode/gist/qtgist.hh</label>
|
||
|
<link refid="qtgist_8hh_source"/>
|
||
|
<childnode refid="27595" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27596" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27649">
|
||
|
<label>/usr/include/gecode/int/nvalues/bool-gq.hpp</label>
|
||
|
<link refid="bool-gq_8hpp_source"/>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27683">
|
||
|
<label>/usr/include/gecode/search/parallel/dfs.hh</label>
|
||
|
<link refid="parallel_2dfs_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27668">
|
||
|
<label>/usr/include/gecode/set/branch.hh</label>
|
||
|
<link refid="set_2branch_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27616">
|
||
|
<label>/usr/include/gecode/int/count.hh</label>
|
||
|
<link refid="count_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27597">
|
||
|
<label>/usr/include/gecode/gist/treecanvas.hh</label>
|
||
|
<link refid="treecanvas_8hh_source"/>
|
||
|
<childnode refid="27594" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27621">
|
||
|
<label>/usr/include/gecode/int/nvalues/int-gq.hpp</label>
|
||
|
<link refid="nvalues_2int-gq_8hpp_source"/>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27644">
|
||
|
<label>/usr/include/gecode/int/count/rel.hpp</label>
|
||
|
<link refid="rel_8hpp_source"/>
|
||
|
<childnode refid="27616" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27631">
|
||
|
<label>/usr/include/gecode/set/element.hh</label>
|
||
|
<link refid="set_2element_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27578">
|
||
|
<label>/usr/include/gecode/kernel.hh</label>
|
||
|
<link refid="kernel_8hh_source"/>
|
||
|
<childnode refid="27579" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27582" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27587" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27588" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27598" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27597" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27589" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27599" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27601" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27676" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27677" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27657" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27678" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27667" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27670">
|
||
|
<label>/usr/include/gecode/set/distinct.hh</label>
|
||
|
<link refid="set_2distinct_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27593">
|
||
|
<label>/usr/include/gecode/gist/nodestats.hh</label>
|
||
|
<link refid="nodestats_8hh_source"/>
|
||
|
<childnode refid="27594" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27673">
|
||
|
<label>/usr/include/gecode/set/rel-op.hh</label>
|
||
|
<link refid="rel-op_8hh_source"/>
|
||
|
<childnode refid="27631" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27672" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27622">
|
||
|
<label>/usr/include/gecode/int/nvalues/int-lq.hpp</label>
|
||
|
<link refid="nvalues_2int-lq_8hpp_source"/>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27630">
|
||
|
<label>/usr/include/gecode/int/element.hh</label>
|
||
|
<link refid="int_2element_8hh_source"/>
|
||
|
<childnode refid="27631" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27614">
|
||
|
<label>/usr/include/gecode/int/channel.hh</label>
|
||
|
<link refid="int_2channel_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27677">
|
||
|
<label>/usr/include/gecode/kernel/wait.hh</label>
|
||
|
<link refid="wait_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27635">
|
||
|
<label>/usr/include/gecode/set/ldsb.hh</label>
|
||
|
<link refid="set_2ldsb_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27596">
|
||
|
<label>/usr/include/gecode/gist/nodewidget.hh</label>
|
||
|
<link refid="nodewidget_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27628">
|
||
|
<label>/usr/include/gecode/int/view.hpp</label>
|
||
|
<link refid="int_2view_8hpp_source"/>
|
||
|
<childnode refid="27601" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27603">
|
||
|
<label>/usr/include/gecode/int/bin-packing.hh</label>
|
||
|
<link refid="bin-packing_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27690">
|
||
|
<label>/usr/include/gecode/search/worker.hh</label>
|
||
|
<link refid="worker_8hh_source"/>
|
||
|
<childnode refid="27681" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27680" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27685" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27686" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27684" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27604">
|
||
|
<label>/usr/include/gecode/int/bool.hh</label>
|
||
|
<link refid="bool_8hh_source"/>
|
||
|
<childnode refid="27605" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27610" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27612" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27661">
|
||
|
<label>/usr/include/gecode/set/channel/int.hpp</label>
|
||
|
<link refid="set_2channel_2int_8hpp_source"/>
|
||
|
<childnode refid="27660" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27662">
|
||
|
<label>/usr/include/gecode/set/channel/sorted.hpp</label>
|
||
|
<link refid="sorted_8hpp_source"/>
|
||
|
<childnode refid="27660" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27648">
|
||
|
<label>/usr/include/gecode/int/member/re-prop.hpp</label>
|
||
|
<link refid="re-prop_8hpp_source"/>
|
||
|
<childnode refid="27636" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27577">
|
||
|
<label>/usr/include/gecode/kernel/memory-manager.hpp</label>
|
||
|
<link refid="memory-manager.hpp"/>
|
||
|
<childnode refid="27578" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27587">
|
||
|
<label>/usr/include/gecode/gist/node.hh</label>
|
||
|
<link refid="node_8hh_source"/>
|
||
|
<childnode refid="27588" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27634">
|
||
|
<label>/usr/include/gecode/int/ldsb.hh</label>
|
||
|
<link refid="int_2ldsb_8hh_source"/>
|
||
|
<childnode refid="27635" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27680">
|
||
|
<label>/usr/include/gecode/search/parallel/path.hh</label>
|
||
|
<link refid="parallel_2path_8hh_source"/>
|
||
|
<childnode refid="27681" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27599">
|
||
|
<label>/usr/include/gecode/gist.hh</label>
|
||
|
<link refid="gist_8hh_source"/>
|
||
|
<childnode refid="27595" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27596" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27600" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27598" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27597" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27613">
|
||
|
<label>/usr/include/gecode/int/branch.hh</label>
|
||
|
<link refid="int_2branch_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27611">
|
||
|
<label>/usr/include/gecode/int/nvalues.hh</label>
|
||
|
<link refid="nvalues_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27643">
|
||
|
<label>/usr/include/gecode/int/bool/ite.hpp</label>
|
||
|
<link refid="ite_8hpp_source"/>
|
||
|
<childnode refid="27604" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27650">
|
||
|
<label>/usr/include/gecode/int/sequence.hh</label>
|
||
|
<link refid="int_2sequence_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27687">
|
||
|
<label>/usr/include/gecode/search/meta/rbs.hh</label>
|
||
|
<link refid="rbs_8hh_source"/>
|
||
|
<childnode refid="27688" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27682">
|
||
|
<label>/usr/include/gecode/search/parallel/bab.hh</label>
|
||
|
<link refid="parallel_2bab_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27656">
|
||
|
<label>/usr/include/gecode/int/view-val-graph.hh</label>
|
||
|
<link refid="view-val-graph_8hh_source"/>
|
||
|
<childnode refid="27618" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27605">
|
||
|
<label>/usr/include/gecode/int/linear/bool-int.hpp</label>
|
||
|
<link refid="bool-int_8hpp_source"/>
|
||
|
<childnode refid="27606" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27623">
|
||
|
<label>/usr/include/gecode/int/sorted/propagate.hpp</label>
|
||
|
<link refid="sorted_2propagate_8hpp_source"/>
|
||
|
<childnode refid="27624" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27586">
|
||
|
<label>/usr/include/gecode/float/rel.hh</label>
|
||
|
<link refid="float_2rel_8hh_source"/>
|
||
|
<childnode refid="27583" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27598">
|
||
|
<label>/usr/include/gecode/gist/stopbrancher.hh</label>
|
||
|
<link refid="stopbrancher_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27681">
|
||
|
<label>/usr/include/gecode/search/parallel/engine.hh</label>
|
||
|
<link refid="engine_8hh_source"/>
|
||
|
<childnode refid="27682" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27683" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27583">
|
||
|
<label>/usr/include/gecode/float/arithmetic.hh</label>
|
||
|
<link refid="float_2arithmetic_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27581">
|
||
|
<label>/usr/include/gecode/flatzinc/registry.hh</label>
|
||
|
<link refid="registry_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27609">
|
||
|
<label>/usr/include/gecode/int/gcc.hh</label>
|
||
|
<link refid="gcc_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27665">
|
||
|
<label>/usr/include/gecode/set/int/minmax.hpp</label>
|
||
|
<link refid="minmax_8hpp_source"/>
|
||
|
<childnode refid="27664" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27590">
|
||
|
<label>/usr/include/gecode/gist/layoutcursor.hh</label>
|
||
|
<link refid="layoutcursor_8hh_source"/>
|
||
|
<childnode refid="27591" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27588">
|
||
|
<label>/usr/include/gecode/gist/spacenode.hh</label>
|
||
|
<link refid="spacenode_8hh_source"/>
|
||
|
<childnode refid="27589" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27671">
|
||
|
<label>/usr/include/gecode/set/precede.hh</label>
|
||
|
<link refid="set_2precede_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27585">
|
||
|
<label>/usr/include/gecode/float/linear.hh</label>
|
||
|
<link refid="float_2linear_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27684">
|
||
|
<label>/usr/include/gecode/search/sequential/path.hh</label>
|
||
|
<link refid="sequential_2path_8hh_source"/>
|
||
|
<childnode refid="27685" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27686" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27688">
|
||
|
<label>/usr/include/gecode/search/rbs.hpp</label>
|
||
|
<link refid="rbs_8hpp_source"/>
|
||
|
<childnode refid="27678" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27655">
|
||
|
<label>/usr/include/gecode/int/val-set.hh</label>
|
||
|
<link refid="val-set_8hh_source"/>
|
||
|
<childnode refid="27636" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27601">
|
||
|
<label>/usr/include/gecode/int.hh</label>
|
||
|
<link refid="int_8hh_source"/>
|
||
|
<childnode refid="27579" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27583" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27585" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27586" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27582" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27599" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27603" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27604" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27613" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27614" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27615" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27616" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27617" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27618" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27625" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27629" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27630" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27632" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27633" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27609" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27634" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27606" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27636" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27637" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27638" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27639" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27650" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27624" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27651" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27652" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27655" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27656" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27657" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27659" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27661" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27662" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27663" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27665" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27666" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27667" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27610">
|
||
|
<label>/usr/include/gecode/int/nvalues/bool-eq.hpp</label>
|
||
|
<link refid="bool-eq_8hpp_source"/>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27612">
|
||
|
<label>/usr/include/gecode/int/nvalues/bool-lq.hpp</label>
|
||
|
<link refid="bool-lq_8hpp_source"/>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27652">
|
||
|
<label>/usr/include/gecode/int/task.hh</label>
|
||
|
<link refid="task_8hh_source"/>
|
||
|
<childnode refid="27653" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27654" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27633">
|
||
|
<label>/usr/include/gecode/int/extensional.hh</label>
|
||
|
<link refid="extensional_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27679">
|
||
|
<label>/usr/include/gecode/search/meta/nogoods.hh</label>
|
||
|
<link refid="nogoods_8hh_source"/>
|
||
|
<childnode refid="27680" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27684" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27624">
|
||
|
<label>/usr/include/gecode/int/sorted.hh</label>
|
||
|
<link refid="sorted_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27666">
|
||
|
<label>/usr/include/gecode/set/int/weights.hpp</label>
|
||
|
<link refid="weights_8hpp_source"/>
|
||
|
<childnode refid="27664" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27638">
|
||
|
<label>/usr/include/gecode/int/precede.hh</label>
|
||
|
<link refid="int_2precede_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27620">
|
||
|
<label>/usr/include/gecode/int/nvalues/int-eq.hpp</label>
|
||
|
<link refid="nvalues_2int-eq_8hpp_source"/>
|
||
|
<childnode refid="27611" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27584">
|
||
|
<label>/usr/include/gecode/float/branch.hh</label>
|
||
|
<link refid="float_2branch_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27675">
|
||
|
<label>/usr/include/gecode/set/sequence.hh</label>
|
||
|
<link refid="set_2sequence_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27591">
|
||
|
<label>/usr/include/gecode/gist/drawingcursor.hh</label>
|
||
|
<link refid="drawingcursor_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27663">
|
||
|
<label>/usr/include/gecode/set/int/card.hpp</label>
|
||
|
<link refid="card_8hpp_source"/>
|
||
|
<childnode refid="27664" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27607">
|
||
|
<label>/usr/include/gecode/int/arithmetic/divmod.hpp</label>
|
||
|
<link refid="divmod_8hpp_source"/>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27606">
|
||
|
<label>/usr/include/gecode/int/linear.hh</label>
|
||
|
<link refid="int_2linear_8hh_source"/>
|
||
|
<childnode refid="27607" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27608" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27629">
|
||
|
<label>/usr/include/gecode/int/dom.hh</label>
|
||
|
<link refid="dom_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27659">
|
||
|
<label>/usr/include/gecode/set/channel/bool.hpp</label>
|
||
|
<link refid="set_2channel_2bool_8hpp_source"/>
|
||
|
<childnode refid="27660" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27646">
|
||
|
<label>/usr/include/gecode/int/element/pair.hpp</label>
|
||
|
<link refid="pair_8hpp_source"/>
|
||
|
<childnode refid="27630" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27667">
|
||
|
<label>/usr/include/gecode/set.hh</label>
|
||
|
<link refid="set_8hh_source"/>
|
||
|
<childnode refid="27668" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27662" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27660" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27669" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27670" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27631" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27663" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27665" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27666" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27664" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27635" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27671" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27672" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27673" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27674" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27675" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27676">
|
||
|
<label>/usr/include/gecode/iter.hh</label>
|
||
|
<link refid="iter_8hh_source"/>
|
||
|
<childnode refid="27601" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27667" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27689">
|
||
|
<label>/usr/include/gecode/search/support.hh</label>
|
||
|
<link refid="search_2support_8hh_source"/>
|
||
|
<childnode refid="27681" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27680" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27688" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27685" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27686" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="27684" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27615">
|
||
|
<label>/usr/include/gecode/int/circuit.hh</label>
|
||
|
<link refid="circuit_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="27672">
|
||
|
<label>/usr/include/gecode/set/rel-op/post.hpp</label>
|
||
|
<link refid="set_2rel-op_2post_8hpp_source"/>
|
||
|
<childnode refid="27673" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27642">
|
||
|
<label>/usr/include/gecode/int/arithmetic/pow.hpp</label>
|
||
|
<link refid="pow_8hpp_source"/>
|
||
|
<childnode refid="27602" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="27669">
|
||
|
<label>/usr/include/gecode/set/convex.hh</label>
|
||
|
<link refid="convex_8hh_source"/>
|
||
|
</node>
|
||
|
</invincdepgraph>
|
||
|
<innerclass refid="classGecode_1_1MemoryChunk" prot="public">Gecode::MemoryChunk</innerclass>
|
||
|
<innerclass refid="classGecode_1_1HeapChunk" prot="public">Gecode::HeapChunk</innerclass>
|
||
|
<innerclass refid="classGecode_1_1SharedMemory" prot="public">Gecode::SharedMemory</innerclass>
|
||
|
<innerclass refid="classGecode_1_1FreeList" prot="public">Gecode::FreeList</innerclass>
|
||
|
<innerclass refid="classGecode_1_1MemoryManager" prot="public">Gecode::MemoryManager</innerclass>
|
||
|
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
|
||
|
<briefdescription>
|
||
|
</briefdescription>
|
||
|
<detaileddescription>
|
||
|
</detaileddescription>
|
||
|
<programlisting>
|
||
|
<codeline lineno="1"><highlight class="comment">/*<sp/>-*-<sp/>mode:<sp/>C++;<sp/>c-basic-offset:<sp/>2;<sp/>indent-tabs-mode:<sp/>nil<sp/>-*-<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/><sp/>Main<sp/>authors:</highlight></codeline>
|
||
|
<codeline lineno="4"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte<sp/><schulte@gecode.org></highlight></codeline>
|
||
|
<codeline lineno="5"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/><sp/>Contributing<sp/>authors:</highlight></codeline>
|
||
|
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack<sp/><tack@gecode.org></highlight></codeline>
|
||
|
<codeline lineno="8"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/>Bugfixes<sp/>provided<sp/>by:</highlight></codeline>
|
||
|
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Zandra<sp/>Norman</highlight></codeline>
|
||
|
<codeline lineno="11"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/><sp/>Copyright:</highlight></codeline>
|
||
|
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte,<sp/>2002</highlight></codeline>
|
||
|
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack,<sp/>2004</highlight></codeline>
|
||
|
<codeline lineno="15"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/>Last<sp/>modified:</highlight></codeline>
|
||
|
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Date:<sp/>2013-07-11<sp/>12:30:18<sp/>+0200<sp/>(Thu,<sp/>11<sp/>Jul<sp/>2013)<sp/>$<sp/>by<sp/>$Author:<sp/>schulte<sp/>$</highlight></codeline>
|
||
|
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>13840<sp/>$</highlight></codeline>
|
||
|
<codeline lineno="19"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/><sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>Gecode,<sp/>the<sp/>generic<sp/>constraint</highlight></codeline>
|
||
|
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/><sp/>development<sp/>environment:</highlight></codeline>
|
||
|
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>http://www.gecode.org</highlight></codeline>
|
||
|
<codeline lineno="23"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/><sp/>Permission<sp/>is<sp/>hereby<sp/>granted,<sp/>free<sp/>of<sp/>charge,<sp/>to<sp/>any<sp/>person<sp/>obtaining</highlight></codeline>
|
||
|
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/><sp/>a<sp/>copy<sp/>of<sp/>this<sp/>software<sp/>and<sp/>associated<sp/>documentation<sp/>files<sp/>(the</highlight></codeline>
|
||
|
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/><sp/>"Software"),<sp/>to<sp/>deal<sp/>in<sp/>the<sp/>Software<sp/>without<sp/>restriction,<sp/>including</highlight></codeline>
|
||
|
<codeline lineno="27"><highlight class="comment"><sp/>*<sp/><sp/>without<sp/>limitation<sp/>the<sp/>rights<sp/>to<sp/>use,<sp/>copy,<sp/>modify,<sp/>merge,<sp/>publish,</highlight></codeline>
|
||
|
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/><sp/>distribute,<sp/>sublicense,<sp/>and/or<sp/>sell<sp/>copies<sp/>of<sp/>the<sp/>Software,<sp/>and<sp/>to</highlight></codeline>
|
||
|
<codeline lineno="29"><highlight class="comment"><sp/>*<sp/><sp/>permit<sp/>persons<sp/>to<sp/>whom<sp/>the<sp/>Software<sp/>is<sp/>furnished<sp/>to<sp/>do<sp/>so,<sp/>subject<sp/>to</highlight></codeline>
|
||
|
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/><sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
|
||
|
<codeline lineno="31"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/><sp/>The<sp/>above<sp/>copyright<sp/>notice<sp/>and<sp/>this<sp/>permission<sp/>notice<sp/>shall<sp/>be</highlight></codeline>
|
||
|
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/><sp/>included<sp/>in<sp/>all<sp/>copies<sp/>or<sp/>substantial<sp/>portions<sp/>of<sp/>the<sp/>Software.</highlight></codeline>
|
||
|
<codeline lineno="34"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="35"><highlight class="comment"><sp/>*<sp/><sp/>THE<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>"AS<sp/>IS",<sp/>WITHOUT<sp/>WARRANTY<sp/>OF<sp/>ANY<sp/>KIND,</highlight></codeline>
|
||
|
<codeline lineno="36"><highlight class="comment"><sp/>*<sp/><sp/>EXPRESS<sp/>OR<sp/>IMPLIED,<sp/>INCLUDING<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO<sp/>THE<sp/>WARRANTIES<sp/>OF</highlight></codeline>
|
||
|
<codeline lineno="37"><highlight class="comment"><sp/>*<sp/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
|
||
|
<codeline lineno="38"><highlight class="comment"><sp/>*<sp/><sp/>NONINFRINGEMENT.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>AUTHORS<sp/>OR<sp/>COPYRIGHT<sp/>HOLDERS<sp/>BE</highlight></codeline>
|
||
|
<codeline lineno="39"><highlight class="comment"><sp/>*<sp/><sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>CLAIM,<sp/>DAMAGES<sp/>OR<sp/>OTHER<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>AN<sp/>ACTION</highlight></codeline>
|
||
|
<codeline lineno="40"><highlight class="comment"><sp/>*<sp/><sp/>OF<sp/>CONTRACT,<sp/>TORT<sp/>OR<sp/>OTHERWISE,<sp/>ARISING<sp/>FROM,<sp/>OUT<sp/>OF<sp/>OR<sp/>IN<sp/>CONNECTION</highlight></codeline>
|
||
|
<codeline lineno="41"><highlight class="comment"><sp/>*<sp/><sp/>WITH<sp/>THE<sp/>SOFTWARE<sp/>OR<sp/>THE<sp/>USE<sp/>OR<sp/>OTHER<sp/>DEALINGS<sp/>IN<sp/>THE<sp/>SOFTWARE.</highlight></codeline>
|
||
|
<codeline lineno="42"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="43"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gecode<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="48" refid="classGecode_1_1MemoryChunk" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1MemoryChunk" kindref="compound">MemoryChunk</ref><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="49"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="51" refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1MemoryChunk" kindref="compound">MemoryChunk</ref>*<sp/><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref>;</highlight></codeline>
|
||
|
<codeline lineno="53" refid="classGecode_1_1MemoryChunk_1a7217524cd448d68aaaa5d492894a4107" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1MemoryChunk_1a7217524cd448d68aaaa5d492894a4107" kindref="member">size</ref>;</highlight></codeline>
|
||
|
<codeline lineno="54"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
||
|
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="57" refid="classGecode_1_1HeapChunk" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1MemoryChunk" kindref="compound">MemoryChunk</ref><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="60" refid="classGecode_1_1HeapChunk_1a816d3dcf31d3917ef2358fb6c1c39d2a" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1HeapChunk_1a816d3dcf31d3917ef2358fb6c1c39d2a" kindref="member">area</ref>[1];</highlight></codeline>
|
||
|
<codeline lineno="61"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
||
|
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="63"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1Region" kindref="compound">Region</ref>;</highlight></codeline>
|
||
|
<codeline lineno="64"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="66" refid="classGecode_1_1SharedMemory" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1Region" kindref="compound">Region</ref>;</highlight></codeline>
|
||
|
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>use_cnt;</highlight></codeline>
|
||
|
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
||
|
<codeline lineno="74" refid="classGecode_1_1SharedMemory_1a6551b4dd90451b74c6319c459db71238" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1a6551b4dd90451b74c6319c459db71238" kindref="member">free</ref>;</highlight></codeline>
|
||
|
<codeline lineno="76" refid="classGecode_1_1SharedMemory_1a523297fe2e21f8837f9a3c3252f9d003" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1a523297fe2e21f8837f9a3c3252f9d003" kindref="member">area</ref>[<ref refid="namespaceGecode_1_1MemoryConfig_1a89bd47101715e526687377775614dd75" kindref="member">MemoryConfig::region_area_size</ref><sp/>/<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(double)];</highlight></codeline>
|
||
|
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/>region;</highlight></codeline>
|
||
|
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
||
|
<codeline lineno="81" refid="classGecode_1_1SharedMemory_1a35997fe995dc7aa3594484cfb93355e9" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1a35997fe995dc7aa3594484cfb93355e9" kindref="member">n_hc</ref>;</highlight></codeline>
|
||
|
<codeline lineno="83" refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref>;</highlight></codeline>
|
||
|
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/>heap;</highlight></codeline>
|
||
|
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1ae2aaed3d0893ec71fd3fdea467819feb" kindref="member">SharedMemory</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1ac1e2d558febc8fd16b470d4d87a64062" kindref="member">flush</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1a98383de3a10250133cfaa61d4d1fec95" kindref="member">~SharedMemory</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//@</highlight></codeline>
|
||
|
<codeline lineno="95"><highlight class="comment"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1a94e8c4b667a32d564a1cbd03c70d0b4e" kindref="member">region_alloc</ref>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*&<sp/>p);</highlight></codeline>
|
||
|
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//@</highlight></codeline>
|
||
|
<codeline lineno="100"><highlight class="comment"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a57e8a7bc08edd68bf65121198923e05d" kindref="member">heap_alloc</ref>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>l);</highlight></codeline>
|
||
|
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1a96e3e75ba77c0701bb4e01c25a90d9b8" kindref="member">heap_free</ref>(<ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref>);</highlight></codeline>
|
||
|
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a8a17ddcb3f9e18063a7f0ca44551b1da" kindref="member">copy</ref>(</highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>share);</highlight></codeline>
|
||
|
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1aac161ecaf13439e8b7270c8d7cabefcc" kindref="member">release</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/></highlight><highlight class="keyword">operator</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s);</highlight></codeline>
|
||
|
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">operator</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>p);</highlight></codeline>
|
||
|
<codeline lineno="112"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
||
|
<codeline lineno="113"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="123" refid="classGecode_1_1FreeList" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="124"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">protected</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="126" refid="classGecode_1_1FreeList_1af9f8e4304c3b32d60120be64f51a6140" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/><ref refid="classGecode_1_1FreeList_1af9f8e4304c3b32d60120be64f51a6140" kindref="member">_next</ref>;</highlight></codeline>
|
||
|
<codeline lineno="127"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList_1af1afc36981b813bf6aa84b9520692a23" kindref="member">FreeList</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList_1af1afc36981b813bf6aa84b9520692a23" kindref="member">FreeList</ref>(<ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>n);</highlight></codeline>
|
||
|
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/><ref refid="classGecode_1_1FreeList_1ab8373a79677d6628fafd49a76cf41cfe" kindref="member">next</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>**<sp/><ref refid="classGecode_1_1FreeList_1a9874d126df8911a0cd9c04d2bcb51e8f" kindref="member">nextRef</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FreeList_1ab8373a79677d6628fafd49a76cf41cfe" kindref="member">next</ref>(<ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>n);</highlight></codeline>
|
||
|
<codeline lineno="138"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
||
|
<codeline lineno="139"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="141" refid="classGecode_1_1MemoryManager" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classGecode_1_1MemoryManager" kindref="compound">MemoryManager</ref><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="142"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a104180d4a5b7cee66635f3e922109dc9" kindref="member">MemoryManager</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm);</highlight></codeline>
|
||
|
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a104180d4a5b7cee66635f3e922109dc9" kindref="member">MemoryManager</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm,<sp/><ref refid="classGecode_1_1MemoryManager" kindref="compound">MemoryManager</ref>&<sp/>mm,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s_sub);</highlight></codeline>
|
||
|
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1MemoryManager_1a4d87b046d91995bfe75f9cf9dd79024a" kindref="member">release</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm);</highlight></codeline>
|
||
|
<codeline lineno="149"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="150"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>cur_hcsz;<sp/><sp/></highlight></codeline>
|
||
|
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/>cur_hc;<sp/><sp/><sp/><sp/></highlight></codeline>
|
||
|
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>requested;<sp/></highlight></codeline>
|
||
|
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><sp/>start;<sp/></highlight></codeline>
|
||
|
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>lsz;<sp/><sp/><sp/></highlight></codeline>
|
||
|
<codeline lineno="157"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_KERNEL_EXPORT</highlight></codeline>
|
||
|
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>alloc_refill(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s);</highlight></codeline>
|
||
|
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>alloc_fill(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>first);</highlight></codeline>
|
||
|
<codeline lineno="163"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="164"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/><ref refid="classGecode_1_1MemoryManager_1af1041aa5a9da4e30169728ca5acfd3db" kindref="member">alloc</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s);</highlight></codeline>
|
||
|
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/><ref refid="classGecode_1_1MemoryManager_1af7672c021b3670cd9dd108ff3c409223" kindref="member">subscriptions</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="169"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="170"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>fl[<ref refid="namespaceGecode_1_1MemoryConfig_1af8923742d5d86bfd2398832b69dcca67" kindref="member">MemoryConfig::fl_size_max</ref>-<ref refid="namespaceGecode_1_1MemoryConfig_1a763748025cb1a1571450f7a14bf69cb0" kindref="member">MemoryConfig::fl_size_min</ref>+1];</highlight></codeline>
|
||
|
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>fl_refill(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm);</highlight></codeline>
|
||
|
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>sz2i(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i2sz(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="180"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s></highlight></codeline>
|
||
|
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/><ref refid="classGecode_1_1MemoryManager_1a6a9511f6cb6329afcf5f1d750e085f1b" kindref="member">fl_alloc</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm);</highlight></codeline>
|
||
|
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a0b5c901e033d012125cbeb0350c6eb16" kindref="member">fl_dispose</ref>(<ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>f,<sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>l);</highlight></codeline>
|
||
|
<codeline lineno="186"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="187"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1MemoryChunk" kindref="compound">MemoryChunk</ref>*<sp/>slack;</highlight></codeline>
|
||
|
<codeline lineno="190"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
||
|
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1MemoryManager_1adf3a1a21dbf7e00df32e074114cb4f1d" kindref="member">reuse</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>p,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s);</highlight></codeline>
|
||
|
<codeline lineno="193"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
||
|
<codeline lineno="194"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="195"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="196"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="197"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Shared<sp/>memory<sp/>area</highlight></codeline>
|
||
|
<codeline lineno="198"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="199"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="200"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="201"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*</highlight></codeline>
|
||
|
<codeline lineno="202" refid="classGecode_1_1SharedMemory_1ab813586821968dae5a0f4ff429effcbd" refkind="member"><highlight class="normal"><sp/><sp/>SharedMemory::operator<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1a6595368d634d0db095ad8dee79f14d2c" kindref="member">Gecode::heap</ref>.<ref refid="classGecode_1_1Heap_1a55baad1786a0407ba0321cd37745a7a6" kindref="member">ralloc</ref>(s);</highlight></codeline>
|
||
|
<codeline lineno="204"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="205"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="206" refid="classGecode_1_1SharedMemory_1a25730c7472d38a9c58535b9cab576b7c" refkind="member"><highlight class="normal"><sp/><sp/>SharedMemory::operator<sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>p)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a6595368d634d0db095ad8dee79f14d2c" kindref="member">Gecode::heap</ref>.<ref refid="classGecode_1_1Heap_1aa424ffe00ff3f52d7e66a5766db638bf" kindref="member">rfree</ref>(p);</highlight></codeline>
|
||
|
<codeline lineno="208"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="209"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
||
|
<codeline lineno="210" refid="classGecode_1_1SharedMemory_1ae2aaed3d0893ec71fd3fdea467819feb" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1ae2aaed3d0893ec71fd3fdea467819feb" kindref="member">SharedMemory::SharedMemory</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
|
||
|
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>use_cnt(1)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/>region.free<sp/>=<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a89bd47101715e526687377775614dd75" kindref="member">MemoryConfig::region_area_size</ref>;</highlight></codeline>
|
||
|
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/>heap.n_hc<sp/>=<sp/>0;</highlight></codeline>
|
||
|
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/>heap.hc<sp/>=<sp/>NULL;</highlight></codeline>
|
||
|
<codeline lineno="215"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="216"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="217" refid="classGecode_1_1SharedMemory_1ac1e2d558febc8fd16b470d4d87a64062" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1ac1e2d558febc8fd16b470d4d87a64062" kindref="member">SharedMemory::flush</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/>heap.n_hc<sp/>=<sp/>0;</highlight></codeline>
|
||
|
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(heap.hc<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref><sp/>=<sp/>heap.hc;</highlight></codeline>
|
||
|
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>heap.hc<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(hc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref>);</highlight></codeline>
|
||
|
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a6595368d634d0db095ad8dee79f14d2c" kindref="member">Gecode::heap</ref>.<ref refid="classGecode_1_1Heap_1aa424ffe00ff3f52d7e66a5766db638bf" kindref="member">rfree</ref>(hc);</highlight></codeline>
|
||
|
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="224"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="225"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
||
|
<codeline lineno="226" refid="classGecode_1_1SharedMemory_1a98383de3a10250133cfaa61d4d1fec95" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1a98383de3a10250133cfaa61d4d1fec95" kindref="member">SharedMemory::~SharedMemory</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1ac1e2d558febc8fd16b470d4d87a64062" kindref="member">flush</ref>();</highlight></codeline>
|
||
|
<codeline lineno="228"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="229"><highlight class="normal"><sp/><sp/>forceinline<sp/><ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*</highlight></codeline>
|
||
|
<codeline lineno="230" refid="classGecode_1_1SharedMemory_1a8a17ddcb3f9e18063a7f0ca44551b1da" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1a8a17ddcb3f9e18063a7f0ca44551b1da" kindref="member">SharedMemory::copy</ref>(</highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>share)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(share)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>use_cnt++;</highlight></codeline>
|
||
|
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">this</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1ae2aaed3d0893ec71fd3fdea467819feb" kindref="member">SharedMemory</ref>();</highlight></codeline>
|
||
|
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="237"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="238"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="239" refid="classGecode_1_1SharedMemory_1aac161ecaf13439e8b7270c8d7cabefcc" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1aac161ecaf13439e8b7270c8d7cabefcc" kindref="member">SharedMemory::release</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>--use_cnt<sp/>==<sp/>0;</highlight></codeline>
|
||
|
<codeline lineno="241"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="242"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="243" refid="classGecode_1_1SharedMemory_1a94e8c4b667a32d564a1cbd03c70d0b4e" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1a94e8c4b667a32d564a1cbd03c70d0b4e" kindref="member">SharedMemory::region_alloc</ref>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*&<sp/>p)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1_1MemoryConfig_1aab8b52cc0eecf1db607779ea9d7d69ea" kindref="member">MemoryConfig::align</ref>(s);</highlight></codeline>
|
||
|
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(s<sp/>><sp/>region.free)</highlight></codeline>
|
||
|
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/>region.free<sp/>-=<sp/>s;</highlight></codeline>
|
||
|
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/>p<sp/>=<sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*>(&region.area[0])<sp/>+<sp/>region.free;</highlight></codeline>
|
||
|
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="250"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="251"><highlight class="normal"><sp/><sp/>forceinline<sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*</highlight></codeline>
|
||
|
<codeline lineno="252" refid="classGecode_1_1SharedMemory_1a57e8a7bc08edd68bf65121198923e05d" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1a57e8a7bc08edd68bf65121198923e05d" kindref="member">SharedMemory::heap_alloc</ref>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>l)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((heap.hc<sp/>!=<sp/>NULL)<sp/>&&<sp/>(heap.hc->size<sp/><<sp/>l))<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>heap.n_hc--;</highlight></codeline>
|
||
|
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref><sp/>=<sp/>heap.hc;</highlight></codeline>
|
||
|
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>heap.hc<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(hc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref>);</highlight></codeline>
|
||
|
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a6595368d634d0db095ad8dee79f14d2c" kindref="member">Gecode::heap</ref>.<ref refid="classGecode_1_1Heap_1aa424ffe00ff3f52d7e66a5766db638bf" kindref="member">rfree</ref>(hc);</highlight></codeline>
|
||
|
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(heap.hc<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>assert(heap.n_hc<sp/>==<sp/>0);</highlight></codeline>
|
||
|
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref><sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(<ref refid="namespaceGecode_1a6595368d634d0db095ad8dee79f14d2c" kindref="member">Gecode::heap</ref>.<ref refid="classGecode_1_1Heap_1a55baad1786a0407ba0321cd37745a7a6" kindref="member">ralloc</ref>(s));</highlight></codeline>
|
||
|
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hc-><ref refid="classGecode_1_1MemoryChunk_1a7217524cd448d68aaaa5d492894a4107" kindref="member">size</ref><sp/>=<sp/>s;</highlight></codeline>
|
||
|
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref>;</highlight></codeline>
|
||
|
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>heap.n_hc--;</highlight></codeline>
|
||
|
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref><sp/>=<sp/>heap.hc;</highlight></codeline>
|
||
|
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>heap.hc<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(hc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref>);</highlight></codeline>
|
||
|
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref>;</highlight></codeline>
|
||
|
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="270"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="271"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="272" refid="classGecode_1_1SharedMemory_1a96e3e75ba77c0701bb4e01c25a90d9b8" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1SharedMemory_1a96e3e75ba77c0701bb4e01c25a90d9b8" kindref="member">SharedMemory::heap_free</ref>(<ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/>hc)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(heap.n_hc<sp/>==<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a6197bdcb9998a0963a22ee66429b3043" kindref="member">MemoryConfig::n_hc_cache</ref>)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a6595368d634d0db095ad8dee79f14d2c" kindref="member">Gecode::heap</ref>.<ref refid="classGecode_1_1Heap_1aa424ffe00ff3f52d7e66a5766db638bf" kindref="member">rfree</ref>(hc);</highlight></codeline>
|
||
|
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>heap.n_hc++;</highlight></codeline>
|
||
|
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref><sp/>=<sp/>heap.hc;<sp/>heap.hc<sp/>=<sp/><ref refid="classGecode_1_1SharedMemory_1a8617f4154f59e54fead8c9e26f902f58" kindref="member">hc</ref>;</highlight></codeline>
|
||
|
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="279"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="280"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="281"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="282"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="283"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Freelists</highlight></codeline>
|
||
|
<codeline lineno="284"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="285"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="287"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
||
|
<codeline lineno="288" refid="classGecode_1_1FreeList_1af1afc36981b813bf6aa84b9520692a23" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FreeList_1af1afc36981b813bf6aa84b9520692a23" kindref="member">FreeList::FreeList</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{}</highlight></codeline>
|
||
|
<codeline lineno="289"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="290"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
||
|
<codeline lineno="291" refid="classGecode_1_1FreeList_1a46875b41d67aa1429d1e16be296a496e" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FreeList_1af1afc36981b813bf6aa84b9520692a23" kindref="member">FreeList::FreeList</ref>(<ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>n)</highlight></codeline>
|
||
|
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>_next(n)<sp/>{}</highlight></codeline>
|
||
|
<codeline lineno="293"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="294"><highlight class="normal"><sp/><sp/>forceinline<sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*</highlight></codeline>
|
||
|
<codeline lineno="295" refid="classGecode_1_1FreeList_1ab8373a79677d6628fafd49a76cf41cfe" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FreeList_1ab8373a79677d6628fafd49a76cf41cfe" kindref="member">FreeList::next</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
||
|
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FreeList_1af9f8e4304c3b32d60120be64f51a6140" kindref="member">_next</ref>;</highlight></codeline>
|
||
|
<codeline lineno="297"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="298"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="299"><highlight class="normal"><sp/><sp/>forceinline<sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>**</highlight></codeline>
|
||
|
<codeline lineno="300" refid="classGecode_1_1FreeList_1a9874d126df8911a0cd9c04d2bcb51e8f" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FreeList_1a9874d126df8911a0cd9c04d2bcb51e8f" kindref="member">FreeList::nextRef</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>&<ref refid="classGecode_1_1FreeList_1af9f8e4304c3b32d60120be64f51a6140" kindref="member">_next</ref>;</highlight></codeline>
|
||
|
<codeline lineno="302"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="303"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="304"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="305" refid="classGecode_1_1FreeList_1a6bcae4b5f7a4e613622abc7b5387a23f" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FreeList_1ab8373a79677d6628fafd49a76cf41cfe" kindref="member">FreeList::next</ref>(<ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>n)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList_1af9f8e4304c3b32d60120be64f51a6140" kindref="member">_next</ref><sp/>=<sp/>n;</highlight></codeline>
|
||
|
<codeline lineno="307"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="308"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="309"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="310"><highlight class="normal"><sp/><sp/>MemoryManager::sz2i(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(s<sp/>>=<sp/>(<ref refid="namespaceGecode_1_1MemoryConfig_1a763748025cb1a1571450f7a14bf69cb0" kindref="member">MemoryConfig::fl_size_min</ref><sp/><<<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a4a91bf0b2f1340ec06745a48cc0209b6" kindref="member">MemoryConfig::fl_unit_size</ref>));</highlight></codeline>
|
||
|
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(s<sp/><=<sp/>(<ref refid="namespaceGecode_1_1MemoryConfig_1af8923742d5d86bfd2398832b69dcca67" kindref="member">MemoryConfig::fl_size_max</ref><sp/><<<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a4a91bf0b2f1340ec06745a48cc0209b6" kindref="member">MemoryConfig::fl_unit_size</ref>));</highlight></codeline>
|
||
|
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(s<sp/>>><sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a4a91bf0b2f1340ec06745a48cc0209b6" kindref="member">MemoryConfig::fl_unit_size</ref>)<sp/>-<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a763748025cb1a1571450f7a14bf69cb0" kindref="member">MemoryConfig::fl_size_min</ref>;</highlight></codeline>
|
||
|
<codeline lineno="314"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="315"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="316"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="317"><highlight class="normal"><sp/><sp/>MemoryManager::i2sz(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(i<sp/>+<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a763748025cb1a1571450f7a14bf69cb0" kindref="member">MemoryConfig::fl_size_min</ref>)<sp/><<<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a4a91bf0b2f1340ec06745a48cc0209b6" kindref="member">MemoryConfig::fl_unit_size</ref>;</highlight></codeline>
|
||
|
<codeline lineno="319"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="320"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="321"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="322"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="323"><highlight class="comment"><sp/><sp/><sp/>*<sp/>The<sp/>active<sp/>memory<sp/>manager</highlight></codeline>
|
||
|
<codeline lineno="324"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="325"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="326"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="327"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*</highlight></codeline>
|
||
|
<codeline lineno="328" refid="classGecode_1_1MemoryManager_1af1041aa5a9da4e30169728ca5acfd3db" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1af1041aa5a9da4e30169728ca5acfd3db" kindref="member">MemoryManager::alloc</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>sz)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(sz<sp/>><sp/>0);</highlight></codeline>
|
||
|
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Perform<sp/>alignment</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1_1MemoryConfig_1aab8b52cc0eecf1db607779ea9d7d69ea" kindref="member">MemoryConfig::align</ref>(sz);</highlight></codeline>
|
||
|
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>whether<sp/>sufficient<sp/>memory<sp/>left</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sz<sp/>><sp/>lsz)</highlight></codeline>
|
||
|
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>alloc_refill(sm,sz);</highlight></codeline>
|
||
|
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/>lsz<sp/>-=<sp/>sz;</highlight></codeline>
|
||
|
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>start<sp/>+<sp/>lsz;</highlight></codeline>
|
||
|
<codeline lineno="337"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="338"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="339"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*</highlight></codeline>
|
||
|
<codeline lineno="340" refid="classGecode_1_1MemoryManager_1af7672c021b3670cd9dd108ff3c409223" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1af7672c021b3670cd9dd108ff3c409223" kindref="member">MemoryManager::subscriptions</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
||
|
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>&cur_hc-><ref refid="classGecode_1_1HeapChunk_1a816d3dcf31d3917ef2358fb6c1c39d2a" kindref="member">area</ref>[0];</highlight></codeline>
|
||
|
<codeline lineno="342"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="343"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="344"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="345"><highlight class="normal"><sp/><sp/>MemoryManager::alloc_fill(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>sz,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>first)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Adjust<sp/>current<sp/>heap<sp/>chunk<sp/>size</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(((requested<sp/>><sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a27e8d0ecc7917728463768c39a6296f8" kindref="member">MemoryConfig::hcsz_inc_ratio</ref>*cur_hcsz)<sp/>||</highlight></codeline>
|
||
|
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(sz<sp/>><sp/>cur_hcsz))<sp/>&&</highlight></codeline>
|
||
|
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(cur_hcsz<sp/><<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1ae9e40041187c444b99eae610984ec3b8" kindref="member">MemoryConfig::hcsz_max</ref>)<sp/>&&</highlight></codeline>
|
||
|
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>!first)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cur_hcsz<sp/><<=<sp/>1;</highlight></codeline>
|
||
|
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Increment<sp/>the<sp/>size<sp/>that<sp/>it<sp/>caters<sp/>for<sp/>the<sp/>initial<sp/>overhead</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>overhead<sp/>=<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(HeapChunk)<sp/>-<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/>sz<sp/>+=<sp/>overhead;</highlight></codeline>
|
||
|
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Round<sp/>size<sp/>to<sp/>next<sp/>multiple<sp/>of<sp/>current<sp/>heap<sp/>chunk<sp/>size</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>allocate<sp/>=<sp/>((sz<sp/>><sp/>cur_hcsz)<sp/>?</highlight></codeline>
|
||
|
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(((</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal">)<sp/>(sz<sp/>/<sp/>cur_hcsz))<sp/>+<sp/>1)<sp/>*<sp/>cur_hcsz<sp/>:<sp/>cur_hcsz);</highlight></codeline>
|
||
|
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Request<sp/>a<sp/>chunk<sp/>of<sp/>preferably<sp/>size<sp/>allocate,<sp/>but<sp/>at<sp/>least<sp/>size<sp/>sz</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/>HeapChunk*<sp/>hc<sp/>=<sp/>sm-><ref refid="classGecode_1_1SharedMemory_1a57e8a7bc08edd68bf65121198923e05d" kindref="member">heap_alloc</ref>(allocate,sz);</highlight></codeline>
|
||
|
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/>start<sp/>=<sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*>(&hc->area[0]);</highlight></codeline>
|
||
|
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/>lsz<sp/><sp/><sp/>=<sp/>hc->size<sp/>-<sp/>overhead;</highlight></codeline>
|
||
|
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Link<sp/>heap<sp/>chunk,<sp/>where<sp/>the<sp/>first<sp/>heap<sp/>chunk<sp/>is<sp/>kept<sp/>in<sp/>place</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(first)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>requested<sp/>=<sp/>hc->size;</highlight></codeline>
|
||
|
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hc->next<sp/>=<sp/>NULL;<sp/>cur_hc<sp/>=<sp/>hc;</highlight></codeline>
|
||
|
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>requested<sp/>+=<sp/>hc->size;</highlight></codeline>
|
||
|
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hc->next<sp/>=<sp/>cur_hc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref>;<sp/>cur_hc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref><sp/>=<sp/>hc;</highlight></codeline>
|
||
|
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="371"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>GECODE_MEMORY_CHECK</highlight></codeline>
|
||
|
<codeline lineno="372"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>c<sp/>=<sp/>start;<sp/>c<sp/><<sp/>(start+lsz);<sp/>c++)</highlight></codeline>
|
||
|
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*c<sp/>=<sp/>0;</highlight></codeline>
|
||
|
<codeline lineno="374"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
|
||
|
<codeline lineno="375"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="376"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="377"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
||
|
<codeline lineno="378" refid="classGecode_1_1MemoryManager_1a104180d4a5b7cee66635f3e922109dc9" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a104180d4a5b7cee66635f3e922109dc9" kindref="member">MemoryManager::MemoryManager</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm)</highlight></codeline>
|
||
|
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>cur_hcsz(MemoryConfig::hcsz_min),<sp/>requested(0),<sp/>slack(NULL)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/>alloc_fill(sm,cur_hcsz,</highlight><highlight class="keyword">true</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1af8923742d5d86bfd2398832b69dcca67" kindref="member">MemoryConfig::fl_size_max</ref>-<ref refid="namespaceGecode_1_1MemoryConfig_1a763748025cb1a1571450f7a14bf69cb0" kindref="member">MemoryConfig::fl_size_min</ref>+1;</highlight></codeline>
|
||
|
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i--;<sp/>)</highlight></codeline>
|
||
|
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fl[i]<sp/>=<sp/>NULL;</highlight></codeline>
|
||
|
<codeline lineno="384"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="385"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="386"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
||
|
<codeline lineno="387" refid="classGecode_1_1MemoryManager_1ae7391893c4bdd4bdd792b00871589c0d" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a104180d4a5b7cee66635f3e922109dc9" kindref="member">MemoryManager::MemoryManager</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm,<sp/><ref refid="classGecode_1_1MemoryManager" kindref="compound">MemoryManager</ref>&<sp/>mm,<sp/></highlight></codeline>
|
||
|
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s_sub)</highlight></codeline>
|
||
|
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>cur_hcsz(mm.cur_hcsz),<sp/>requested(0),<sp/>slack(NULL)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1_1MemoryConfig_1aab8b52cc0eecf1db607779ea9d7d69ea" kindref="member">MemoryConfig::align</ref>(s_sub);</highlight></codeline>
|
||
|
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((mm.requested<sp/><<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1adffc8bb00df3d4fd50d10e5acdf8fa7e" kindref="member">MemoryConfig::hcsz_dec_ratio</ref>*mm.cur_hcsz)<sp/>&&</highlight></codeline>
|
||
|
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(cur_hcsz<sp/>><sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a5dae9298021e19ef97b80a69c64ec99d" kindref="member">MemoryConfig::hcsz_min</ref>)<sp/>&&</highlight></codeline>
|
||
|
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(s_sub*2<sp/><<sp/>cur_hcsz))</highlight></codeline>
|
||
|
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cur_hcsz<sp/>>>=<sp/>1;</highlight></codeline>
|
||
|
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/>alloc_fill(sm,cur_hcsz+s_sub,</highlight><highlight class="keyword">true</highlight><highlight class="normal">);</highlight></codeline>
|
||
|
<codeline lineno="396"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Skip<sp/>the<sp/>memory<sp/>area<sp/>at<sp/>the<sp/>beginning<sp/>for<sp/>subscriptions</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/>lsz<sp/><sp/><sp/>-=<sp/>s_sub;</highlight></codeline>
|
||
|
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/>start<sp/>+=<sp/>s_sub;</highlight></codeline>
|
||
|
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1af8923742d5d86bfd2398832b69dcca67" kindref="member">MemoryConfig::fl_size_max</ref>-<ref refid="namespaceGecode_1_1MemoryConfig_1a763748025cb1a1571450f7a14bf69cb0" kindref="member">MemoryConfig::fl_size_min</ref>+1;</highlight></codeline>
|
||
|
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i--;<sp/>)</highlight></codeline>
|
||
|
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fl[i]<sp/>=<sp/>NULL;</highlight></codeline>
|
||
|
<codeline lineno="402"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="403"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="404"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="405" refid="classGecode_1_1MemoryManager_1a4d87b046d91995bfe75f9cf9dd79024a" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a4d87b046d91995bfe75f9cf9dd79024a" kindref="member">MemoryManager::release</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Release<sp/>all<sp/>allocated<sp/>heap<sp/>chunks</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/>hc<sp/>=<sp/>cur_hc;</highlight></codeline>
|
||
|
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*<sp/>t<sp/>=<sp/>hc;<sp/>hc<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1HeapChunk" kindref="compound">HeapChunk</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(hc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref>);</highlight></codeline>
|
||
|
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sm-><ref refid="classGecode_1_1SharedMemory_1a96e3e75ba77c0701bb4e01c25a90d9b8" kindref="member">heap_free</ref>(t);</highlight></codeline>
|
||
|
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(hc<sp/>!=<sp/>NULL);</highlight></codeline>
|
||
|
<codeline lineno="412"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="413"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="414"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="415"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="416"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="417"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Slack<sp/>memory<sp/>management</highlight></codeline>
|
||
|
<codeline lineno="418"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="419"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="420"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="421" refid="classGecode_1_1MemoryManager_1adf3a1a21dbf7e00df32e074114cb4f1d" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1adf3a1a21dbf7e00df32e074114cb4f1d" kindref="member">MemoryManager::reuse</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/>p,<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="422"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>GECODE_MEMORY_CHECK</highlight></codeline>
|
||
|
<codeline lineno="423"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>c<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*</highlight><highlight class="keyword">></highlight><highlight class="normal">(p);</highlight></codeline>
|
||
|
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>e<sp/>=<sp/>c<sp/>+<sp/>s;</highlight></codeline>
|
||
|
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(c<sp/><<sp/>e)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*c<sp/>=<sp/>0;<sp/>c++;</highlight></codeline>
|
||
|
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="430"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
|
||
|
<codeline lineno="431"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(s<sp/><<sp/>(<ref refid="namespaceGecode_1_1MemoryConfig_1a763748025cb1a1571450f7a14bf69cb0" kindref="member">MemoryConfig::fl_size_min</ref><<<ref refid="namespaceGecode_1_1MemoryConfig_1a4a91bf0b2f1340ec06745a48cc0209b6" kindref="member">MemoryConfig::fl_unit_size</ref>))</highlight></codeline>
|
||
|
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(s<sp/>><sp/>(<ref refid="namespaceGecode_1_1MemoryConfig_1af8923742d5d86bfd2398832b69dcca67" kindref="member">MemoryConfig::fl_size_max</ref><<<ref refid="namespaceGecode_1_1MemoryConfig_1a4a91bf0b2f1340ec06745a48cc0209b6" kindref="member">MemoryConfig::fl_unit_size</ref>))<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1MemoryChunk" kindref="compound">MemoryChunk</ref>*<sp/>rc<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1MemoryChunk" kindref="compound">MemoryChunk</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(p);</highlight></codeline>
|
||
|
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rc-><ref refid="classGecode_1_1MemoryChunk_1ab1111ac3a474b7d74513756bf3655e16" kindref="member">next</ref><sp/>=<sp/>slack;</highlight></codeline>
|
||
|
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rc-><ref refid="classGecode_1_1MemoryChunk_1a7217524cd448d68aaaa5d492894a4107" kindref="member">size</ref><sp/>=<sp/>s;</highlight></codeline>
|
||
|
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>slack<sp/>=<sp/>rc;</highlight></codeline>
|
||
|
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>sz2i(s);</highlight></codeline>
|
||
|
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>f<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(p);</highlight></codeline>
|
||
|
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>f-><ref refid="classGecode_1_1FreeList_1ab8373a79677d6628fafd49a76cf41cfe" kindref="member">next</ref>(fl[i]);<sp/>fl[i]=f;</highlight></codeline>
|
||
|
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="443"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="444"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="445"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="446"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="447"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Freelist<sp/>management</highlight></codeline>
|
||
|
<codeline lineno="448"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="449"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="450"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="451"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s></highlight></codeline>
|
||
|
<codeline lineno="452"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*</highlight></codeline>
|
||
|
<codeline lineno="453"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a6a9511f6cb6329afcf5f1d750e085f1b" kindref="member">MemoryManager::fl_alloc</ref>(<ref refid="classGecode_1_1SharedMemory" kindref="compound">SharedMemory</ref>*<sp/>sm)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>sz2i(s);</highlight></codeline>
|
||
|
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FreeList" kindref="compound">FreeList</ref>*<sp/>f<sp/>=<sp/>fl[i];</highlight></codeline>
|
||
|
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(f<sp/>==<sp/>NULL)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fl_refill<s>(sm);<sp/>f<sp/>=<sp/>fl[i];</highlight></codeline>
|
||
|
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/>FreeList*<sp/>n<sp/>=<sp/>f-><ref refid="classGecode_1_1FreeList_1ab8373a79677d6628fafd49a76cf41cfe" kindref="member">next</ref>();</highlight></codeline>
|
||
|
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/>fl[i]<sp/>=<sp/>n;</highlight></codeline>
|
||
|
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>f;</highlight></codeline>
|
||
|
<codeline lineno="462"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="463"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="464"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s></highlight></codeline>
|
||
|
<codeline lineno="465"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="466"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1MemoryManager_1a0b5c901e033d012125cbeb0350c6eb16" kindref="member">MemoryManager::fl_dispose</ref>(FreeList*<sp/>f,<sp/>FreeList*<sp/>l)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>sz2i(s);</highlight></codeline>
|
||
|
<codeline lineno="468"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>GECODE_AUDIT</highlight></codeline>
|
||
|
<codeline lineno="469"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/>FreeList*<sp/>cur<sp/>=<sp/>f;</highlight></codeline>
|
||
|
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(cur<sp/>!=<sp/>l)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>assert(cur->next());</highlight></codeline>
|
||
|
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cur<sp/>=<sp/>cur->next();</highlight></codeline>
|
||
|
<codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="474"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
|
||
|
<codeline lineno="475"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/>l->next(fl[i]);<sp/>fl[i]<sp/>=<sp/>f;</highlight></codeline>
|
||
|
<codeline lineno="476"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="477"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="478"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>sz></highlight></codeline>
|
||
|
<codeline lineno="479"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="480"><highlight class="normal"><sp/><sp/>MemoryManager::fl_refill(SharedMemory*<sp/>sm)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Try<sp/>to<sp/>acquire<sp/>memory<sp/>from<sp/>slack</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(slack<sp/>!=<sp/>NULL)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>MemoryChunk*<sp/>m<sp/>=<sp/>slack;</highlight></codeline>
|
||
|
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>slack<sp/>=<sp/>NULL;</highlight></codeline>
|
||
|
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><sp/>block<sp/>=<sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*>(m);</highlight></codeline>
|
||
|
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>s<sp/><sp/><sp/><sp/><sp/>=<sp/>m->size;</highlight></codeline>
|
||
|
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>assert(s<sp/>>=<sp/>sz);</highlight></codeline>
|
||
|
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>m<sp/>=<sp/>m->next;</highlight></codeline>
|
||
|
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fl[sz2i(sz)]<sp/>=<sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><FreeList*>(block);</highlight></codeline>
|
||
|
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(s<sp/>>=<sp/>2*sz)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><FreeList*>(block)->next(ptr_cast<FreeList*>(block+sz));</highlight></codeline>
|
||
|
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>block<sp/>+=<sp/>sz;</highlight></codeline>
|
||
|
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>s<sp/><sp/><sp/><sp/><sp/>-=<sp/>sz;</highlight></codeline>
|
||
|
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="496"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><FreeList*>(block)->next(NULL);</highlight></codeline>
|
||
|
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(m<sp/>!=<sp/>NULL);</highlight></codeline>
|
||
|
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>block<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*</highlight><highlight class="keyword">></highlight><highlight class="normal">(<ref refid="classGecode_1_1MemoryManager_1af1041aa5a9da4e30169728ca5acfd3db" kindref="member">alloc</ref>(sm,<ref refid="namespaceGecode_1_1MemoryConfig_1a7fee173ee69d3658d9901d96b3616d7f" kindref="member">MemoryConfig::fl_refill</ref>*sz));</highlight></codeline>
|
||
|
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>fl[sz2i(sz)]<sp/>=<sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><FreeList*>(block);</highlight></codeline>
|
||
|
<codeline lineno="501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/><ref refid="namespaceGecode_1_1MemoryConfig_1a7fee173ee69d3658d9901d96b3616d7f" kindref="member">MemoryConfig::fl_refill</ref>-2;</highlight></codeline>
|
||
|
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><FreeList*>(block+i*sz)->next(ptr_cast<FreeList*>(block+(i+1)*sz));</highlight></codeline>
|
||
|
<codeline lineno="504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(--i<sp/>>=<sp/>0);</highlight></codeline>
|
||
|
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1a3f77d74c9e355a9b9a5072feb6e5475f" kindref="member">ptr_cast</ref><FreeList*>(block+</highlight></codeline>
|
||
|
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<ref refid="namespaceGecode_1_1MemoryConfig_1a7fee173ee69d3658d9901d96b3616d7f" kindref="member">MemoryConfig::fl_refill</ref>-1)*sz)->next</highlight></codeline>
|
||
|
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(ptr_cast<FreeList*>(NULL));</highlight></codeline>
|
||
|
<codeline lineno="508"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="509"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="510"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="511"><highlight class="normal">}</highlight></codeline>
|
||
|
<codeline lineno="512"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="513"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>kernel-memory</highlight><highlight class="normal"></highlight></codeline>
|
||
|
</programlisting>
|
||
|
<location file="/usr/include/gecode/kernel/memory-manager.hpp"/>
|
||
|
</compounddef>
|
||
|
</doxygen>
|