| <?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.9.8" xml:lang="en-US"> |
| <compounddef id="memory__segment_8h" kind="file" language="C++"> |
| <compoundname>memory_segment.h</compoundname> |
| <includes local="no">cassert</includes> |
| <includes local="no">cstdint</includes> |
| <includes local="no">cstring</includes> |
| <includes local="no">memory</includes> |
| <includes local="no">type_traits</includes> |
| <includes refid="byte__order_8h" local="yes">paimon/io/byte_order.h</includes> |
| <includes refid="bytes_8h" local="yes">paimon/memory/bytes.h</includes> |
| <includes refid="visibility_8h" local="yes">paimon/visibility.h</includes> |
| <includedby refid="cache_8h" local="yes">/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/cache/cache.h</includedby> |
| <incdepgraph> |
| <node id="7"> |
| <label>paimon/io/byte_order.h</label> |
| <link refid="byte__order_8h"/> |
| <childnode refid="3" relation="include"> |
| </childnode> |
| </node> |
| <node id="8"> |
| <label>paimon/memory/bytes.h</label> |
| <link refid="bytes_8h"/> |
| <childnode refid="9" relation="include"> |
| </childnode> |
| <childnode refid="3" relation="include"> |
| </childnode> |
| <childnode refid="10" relation="include"> |
| </childnode> |
| <childnode refid="11" relation="include"> |
| </childnode> |
| <childnode refid="16" relation="include"> |
| </childnode> |
| </node> |
| <node id="11"> |
| <label>paimon/memory/memory_pool.h</label> |
| <link refid="memory__pool_8h"/> |
| <childnode refid="2" relation="include"> |
| </childnode> |
| <childnode refid="9" relation="include"> |
| </childnode> |
| <childnode refid="3" relation="include"> |
| </childnode> |
| <childnode refid="12" relation="include"> |
| </childnode> |
| <childnode refid="5" relation="include"> |
| </childnode> |
| <childnode refid="13" relation="include"> |
| </childnode> |
| <childnode refid="14" relation="include"> |
| </childnode> |
| <childnode refid="15" relation="include"> |
| </childnode> |
| <childnode refid="16" relation="include"> |
| </childnode> |
| </node> |
| <node id="1"> |
| <label>/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/memory/memory_segment.h</label> |
| <link refid="memory__segment_8h"/> |
| <childnode refid="2" relation="include"> |
| </childnode> |
| <childnode refid="3" relation="include"> |
| </childnode> |
| <childnode refid="4" relation="include"> |
| </childnode> |
| <childnode refid="5" relation="include"> |
| </childnode> |
| <childnode refid="6" relation="include"> |
| </childnode> |
| <childnode refid="7" relation="include"> |
| </childnode> |
| <childnode refid="8" relation="include"> |
| </childnode> |
| <childnode refid="16" relation="include"> |
| </childnode> |
| </node> |
| <node id="16"> |
| <label>paimon/visibility.h</label> |
| <link refid="visibility_8h"/> |
| </node> |
| <node id="2"> |
| <label>cassert</label> |
| </node> |
| <node id="9"> |
| <label>cstddef</label> |
| </node> |
| <node id="3"> |
| <label>cstdint</label> |
| </node> |
| <node id="4"> |
| <label>cstring</label> |
| </node> |
| <node id="12"> |
| <label>functional</label> |
| </node> |
| <node id="5"> |
| <label>memory</label> |
| </node> |
| <node id="13"> |
| <label>new</label> |
| </node> |
| <node id="15"> |
| <label>paimon/macros.h</label> |
| </node> |
| <node id="10"> |
| <label>string</label> |
| </node> |
| <node id="6"> |
| <label>type_traits</label> |
| </node> |
| <node id="14"> |
| <label>utility</label> |
| </node> |
| </incdepgraph> |
| <invincdepgraph> |
| <node id="4"> |
| <label>/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/api.h</label> |
| <link refid="api_8h"/> |
| </node> |
| <node id="2"> |
| <label>/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/cache/cache.h</label> |
| <link refid="cache_8h"/> |
| <childnode refid="3" relation="include"> |
| </childnode> |
| <childnode refid="6" relation="include"> |
| </childnode> |
| </node> |
| <node id="1"> |
| <label>/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/memory/memory_segment.h</label> |
| <link refid="memory__segment_8h"/> |
| <childnode refid="2" relation="include"> |
| </childnode> |
| </node> |
| <node id="3"> |
| <label>/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/read_context.h</label> |
| <link refid="read__context_8h"/> |
| <childnode refid="4" relation="include"> |
| </childnode> |
| <childnode refid="5" relation="include"> |
| </childnode> |
| </node> |
| <node id="6"> |
| <label>/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/scan_context.h</label> |
| <link refid="scan__context_8h"/> |
| <childnode refid="4" relation="include"> |
| </childnode> |
| </node> |
| <node id="5"> |
| <label>/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/table/source/table_read.h</label> |
| <link refid="table__read_8h"/> |
| <childnode refid="4" relation="include"> |
| </childnode> |
| </node> |
| </invincdepgraph> |
| <innerclass refid="classpaimon_1_1_memory_segment" prot="public">paimon::MemorySegment</innerclass> |
| <innernamespace refid="namespacepaimon">paimon</innernamespace> |
| <briefdescription> |
| </briefdescription> |
| <detaileddescription> |
| </detaileddescription> |
| <programlisting> |
| <codeline lineno="1"><highlight class="comment">/*</highlight></codeline> |
| <codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Licensed<sp/>to<sp/>the<sp/>Apache<sp/>Software<sp/>Foundation<sp/>(ASF)<sp/>under<sp/>one</highlight></codeline> |
| <codeline lineno="3"><highlight class="comment"><sp/>*<sp/>or<sp/>more<sp/>contributor<sp/>license<sp/>agreements.<sp/><sp/>See<sp/>the<sp/>NOTICE<sp/>file</highlight></codeline> |
| <codeline lineno="4"><highlight class="comment"><sp/>*<sp/>distributed<sp/>with<sp/>this<sp/>work<sp/>for<sp/>additional<sp/>information</highlight></codeline> |
| <codeline lineno="5"><highlight class="comment"><sp/>*<sp/>regarding<sp/>copyright<sp/>ownership.<sp/><sp/>The<sp/>ASF<sp/>licenses<sp/>this<sp/>file</highlight></codeline> |
| <codeline lineno="6"><highlight class="comment"><sp/>*<sp/>to<sp/>you<sp/>under<sp/>the<sp/>Apache<sp/>License,<sp/>Version<sp/>2.0<sp/>(the</highlight></codeline> |
| <codeline lineno="7"><highlight class="comment"><sp/>*<sp/>"License");<sp/>you<sp/>may<sp/>not<sp/>use<sp/>this<sp/>file<sp/>except<sp/>in<sp/>compliance</highlight></codeline> |
| <codeline lineno="8"><highlight class="comment"><sp/>*<sp/>with<sp/>the<sp/>License.<sp/><sp/>You<sp/>may<sp/>obtain<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>License<sp/>at</highlight></codeline> |
| <codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline> |
| <codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/><sp/>http://www.apache.org/licenses/LICENSE-2.0</highlight></codeline> |
| <codeline lineno="11"><highlight class="comment"><sp/>*</highlight></codeline> |
| <codeline lineno="12"><highlight class="comment"><sp/>*<sp/>Unless<sp/>required<sp/>by<sp/>applicable<sp/>law<sp/>or<sp/>agreed<sp/>to<sp/>in<sp/>writing,</highlight></codeline> |
| <codeline lineno="13"><highlight class="comment"><sp/>*<sp/>software<sp/>distributed<sp/>under<sp/>the<sp/>License<sp/>is<sp/>distributed<sp/>on<sp/>an</highlight></codeline> |
| <codeline lineno="14"><highlight class="comment"><sp/>*<sp/>"AS<sp/>IS"<sp/>BASIS,<sp/>WITHOUT<sp/>WARRANTIES<sp/>OR<sp/>CONDITIONS<sp/>OF<sp/>ANY</highlight></codeline> |
| <codeline lineno="15"><highlight class="comment"><sp/>*<sp/>KIND,<sp/>either<sp/>express<sp/>or<sp/>implied.<sp/><sp/>See<sp/>the<sp/>License<sp/>for<sp/>the</highlight></codeline> |
| <codeline lineno="16"><highlight class="comment"><sp/>*<sp/>specific<sp/>language<sp/>governing<sp/>permissions<sp/>and<sp/>limitations</highlight></codeline> |
| <codeline lineno="17"><highlight class="comment"><sp/>*<sp/>under<sp/>the<sp/>License.</highlight></codeline> |
| <codeline lineno="18"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="19"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="20"><highlight class="normal"></highlight><highlight class="preprocessor">#pragma<sp/>once</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="21"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="22"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><cassert></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="23"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><cstdint></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="24"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><cstring></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="25"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><memory></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><type_traits></highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="27"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="byte__order_8h" kindref="compound">paimon/io/byte_order.h</ref>"</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="bytes_8h" kindref="compound">paimon/memory/bytes.h</ref>"</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="visibility_8h" kindref="compound">paimon/visibility.h</ref>"</highlight><highlight class="normal"></highlight></codeline> |
| <codeline lineno="31"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="32"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal"><ref refid="namespacepaimon" kindref="compound">paimon</ref><sp/>{</highlight></codeline> |
| <codeline lineno="33"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">MemoryPool;</highlight></codeline> |
| <codeline lineno="34"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="41" refid="classpaimon_1_1_memory_segment" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">PAIMON_EXPORT</ref><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref><sp/>{</highlight></codeline> |
| <codeline lineno="42"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline> |
| <codeline lineno="43" refid="classpaimon_1_1_memory_segment_1a5faa808d16c2f0a81808c166c088e07c" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classpaimon_1_1_memory_segment_1a5faa808d16c2f0a81808c166c088e07c" kindref="member">MemorySegment</ref>()<sp/>:<sp/>data_(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">nullptr</ref>),<sp/>size_(0)<sp/>{}</highlight></codeline> |
| <codeline lineno="44"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="46" refid="classpaimon_1_1_memory_segment_1aef0dd92558d06b22cb576c69fbc357bc" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1aef0dd92558d06b22cb576c69fbc357bc" kindref="member">Wrap</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::shared_ptr<Bytes>&<sp/>buffer)<sp/>{</highlight></codeline> |
| <codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>(buffer);</highlight></codeline> |
| <codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="49"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="52" refid="classpaimon_1_1_memory_segment_1af2063071f930f0007fa405325578b897" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1af2063071f930f0007fa405325578b897" kindref="member">WrapView</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>data,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>size)<sp/>{</highlight></codeline> |
| <codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>(data,<sp/>size);</highlight></codeline> |
| <codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="55"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="56" refid="classpaimon_1_1_memory_segment_1ad1e44059887eb146ecc7d503613c8011" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1ad1e44059887eb146ecc7d503613c8011" kindref="member">AllocateHeapMemory</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>size,<sp/><ref refid="classpaimon_1_1_memory_pool" kindref="compound">MemoryPool</ref>*<sp/>pool)<sp/>{</highlight></codeline> |
| <codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(pool);</highlight></codeline> |
| <codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>Wrap(Bytes::AllocateBytes(size,<sp/>pool));</highlight></codeline> |
| <codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="60"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="61" refid="classpaimon_1_1_memory_segment_1adbc873e8e404278f5d284e04cd442f36" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classpaimon_1_1_memory_segment_1adbc873e8e404278f5d284e04cd442f36" kindref="member">MemorySegment</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>)<sp/>=<sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="62" refid="classpaimon_1_1_memory_segment_1a90c184c7807684c20bcde41797d253c7" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>&<sp/><ref refid="classpaimon_1_1_memory_segment_1a90c184c7807684c20bcde41797d253c7" kindref="member">operator=</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>)<sp/>=<sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="63"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="64" refid="classpaimon_1_1_memory_segment_1a507cd46f4b36b763cf1f6013b06c8611" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a507cd46f4b36b763cf1f6013b06c8611" kindref="member">operator==</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">this</highlight><highlight class="normal"><sp/>==<sp/>&<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>)<sp/>{</highlight></codeline> |
| <codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><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="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(data_<sp/>==<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>.data_<sp/>&&<sp/>size_<sp/>==<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>.size_)<sp/>{</highlight></codeline> |
| <codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><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="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!data_<sp/>||<sp/>!<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>.data_)<sp/>{</highlight></codeline> |
| <codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><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="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(size_<sp/>!=<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>.size_)<sp/>{</highlight></codeline> |
| <codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><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="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>std::memcmp(data_,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">other</ref>.data_,<sp/>size_)<sp/>==<sp/>0;</highlight></codeline> |
| <codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="79"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="80" refid="classpaimon_1_1_memory_segment_1a130a557a1a12e26f402489b91539c596" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1a130a557a1a12e26f402489b91539c596" kindref="member">Size</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>size_;</highlight></codeline> |
| <codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="83"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="85" refid="classpaimon_1_1_memory_segment_1ad8172247e0bd1bc78fdb65409428d4a2" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="classpaimon_1_1_memory_segment_1ad8172247e0bd1bc78fdb65409428d4a2" kindref="member">Data</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>data_;</highlight></codeline> |
| <codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="88"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="89" refid="classpaimon_1_1_memory_segment_1a75063ceffc750af04502838612f5056e" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a75063ceffc750af04502838612f5056e" kindref="member">Get</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>*(data_<sp/>+<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>);</highlight></codeline> |
| <codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="92"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="94" refid="classpaimon_1_1_memory_segment_1a5e698a309376175699ecbe80614e10aa" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="classpaimon_1_1_memory_segment_1a5e698a309376175699ecbe80614e10aa" kindref="member">MutableData</ref>()<sp/>{</highlight></codeline> |
| <codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const_cast<</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*</highlight><highlight class="keyword">></highlight><highlight class="normal">(data_);</highlight></codeline> |
| <codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="97"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="98" refid="classpaimon_1_1_memory_segment_1a3fce19b1b1e5c1da996b7c60fde7e69f" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a3fce19b1b1e5c1da996b7c60fde7e69f" kindref="member">Put</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">b</ref>)<sp/>{</highlight></codeline> |
| <codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MutableData()[<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>]<sp/>=<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">b</ref>;</highlight></codeline> |
| <codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="101"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="102" refid="classpaimon_1_1_memory_segment_1a6c44b1f183c76129d0a24ed8cd6b1ccf" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a6c44b1f183c76129d0a24ed8cd6b1ccf" kindref="member">Get</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/><ref refid="classpaimon_1_1_bytes" kindref="compound">Bytes</ref>*<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">dst</ref>)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>Get(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">dst</ref>,<sp/></highlight><highlight class="comment">/*offset=*/</highlight><highlight class="normal">0,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">dst</ref>->size());</highlight></codeline> |
| <codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="105"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="106" refid="classpaimon_1_1_memory_segment_1a089f57071308e6c306293462513eb9fe" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a089f57071308e6c306293462513eb9fe" kindref="member">Put</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_bytes" kindref="compound">Bytes</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">src</ref>)<sp/>{</highlight></codeline> |
| <codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>Put(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">src</ref>,<sp/></highlight><highlight class="comment">/*offset=*/</highlight><highlight class="normal">0,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">src</ref>.size());</highlight></codeline> |
| <codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="109"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/><</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T></highlight></codeline> |
| <codeline lineno="111" refid="classpaimon_1_1_memory_segment_1a56b9f11f31752e26d180fa60bf75bf9d" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a56b9f11f31752e26d180fa60bf75bf9d" kindref="member">Get</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">T</ref>*<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">dst</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>offset,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>length)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(</highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref></highlight><highlight class="keyword">></highlight><highlight class="normal">(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">dst</ref>->size())<sp/>>=<sp/>(offset<sp/>+<sp/>length));</highlight></codeline> |
| <codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(size_<sp/>>=<sp/>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref><sp/>+<sp/>length));</highlight></codeline> |
| <codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(length<sp/>!=<sp/>0)<sp/>{</highlight></codeline> |
| <codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::memcpy(</highlight><highlight class="keyword">const_cast<</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*</highlight><highlight class="keyword">></highlight><highlight class="normal">(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">dst</ref>->data())<sp/>+<sp/>offset,<sp/>data_<sp/>+<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/>length);</highlight></codeline> |
| <codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="118"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/><</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T></highlight></codeline> |
| <codeline lineno="120" refid="classpaimon_1_1_memory_segment_1a24683f71837f647484b3505731749076" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a24683f71837f647484b3505731749076" kindref="member">Put</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">T</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">src</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>offset,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>length)<sp/>{</highlight></codeline> |
| <codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(</highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref></highlight><highlight class="keyword">></highlight><highlight class="normal">(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">src</ref>.size())<sp/>>=<sp/>(offset<sp/>+<sp/>length));</highlight></codeline> |
| <codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(size_<sp/>>=<sp/>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref><sp/>+<sp/>length));</highlight></codeline> |
| <codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(length<sp/>!=<sp/>0)<sp/>{</highlight></codeline> |
| <codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::memcpy(MutableData()<sp/>+<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">src</ref>.data()<sp/>+<sp/>offset,<sp/>length);</highlight></codeline> |
| <codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="127"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/><</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T></highlight></codeline> |
| <codeline lineno="129" refid="classpaimon_1_1_memory_segment_1a2ce210c7f2a88826dbb9e0a9a847431b" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">T</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1a2ce210c7f2a88826dbb9e0a9a847431b" kindref="member">GetValue</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_assert</highlight><highlight class="normal">(std::is_trivially_copyable_v<T>,<sp/></highlight><highlight class="stringliteral">"T<sp/>must<sp/>be<sp/>trivially<sp/>copyable"</highlight><highlight class="normal">);</highlight></codeline> |
| <codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">T</ref><sp/>value;</highlight></codeline> |
| <codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::memcpy(&value,<sp/>data_<sp/>+<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">T</ref>));</highlight></codeline> |
| <codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>value;</highlight></codeline> |
| <codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="135"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/><</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T></highlight></codeline> |
| <codeline lineno="137" refid="classpaimon_1_1_memory_segment_1ab9dbf9529f2b386532a876127a3109f0" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1ab9dbf9529f2b386532a876127a3109f0" kindref="member">PutValue</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">T</ref>&<sp/>value)<sp/>{</highlight></codeline> |
| <codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_assert</highlight><highlight class="normal">(std::is_trivially_copyable_v<T>,<sp/></highlight><highlight class="stringliteral">"T<sp/>must<sp/>be<sp/>trivially<sp/>copyable"</highlight><highlight class="normal">);</highlight></codeline> |
| <codeline lineno="139"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::memcpy(MutableData()<sp/>+<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/>&value,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">T</ref>));</highlight></codeline> |
| <codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="142"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="143" refid="classpaimon_1_1_memory_segment_1a95e247bd52b7227c7e158cd856206d31" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">uint64_t</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1a95e247bd52b7227c7e158cd856206d31" kindref="member">GetLongBigEndian</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="144"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="145" refid="classpaimon_1_1_memory_segment_1af0bbb2c6fbebc7a674d4300ef7e53684" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1af0bbb2c6fbebc7a674d4300ef7e53684" kindref="member">CopyTo</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>offset,<sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>*<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target_offset</ref>,</highlight></codeline> |
| <codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">num_bytes</ref>)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(offset<sp/>>=<sp/>0);</highlight></codeline> |
| <codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target_offset</ref><sp/>>=<sp/>0);</highlight></codeline> |
| <codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">num_bytes</ref><sp/>>=<sp/>0);</highlight></codeline> |
| <codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">num_bytes</ref><sp/>!=<sp/>0)<sp/>{</highlight></codeline> |
| <codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::memcpy(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target</ref>->MutableData()<sp/>+<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target_offset</ref>,<sp/>data_<sp/>+<sp/>offset,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">num_bytes</ref>);</highlight></codeline> |
| <codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="154"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="155" refid="classpaimon_1_1_memory_segment_1acbab1794f5d7552c8284f3106509e480" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1acbab1794f5d7552c8284f3106509e480" kindref="member">CopyToUnsafe</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>offset,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target_offset</ref>,</highlight></codeline> |
| <codeline lineno="156"><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/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">num_bytes</ref>)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">num_bytes</ref><sp/>!=<sp/>0)<sp/>{</highlight></codeline> |
| <codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::memcpy(</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="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target</ref>)<sp/>+<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">target_offset</ref>,<sp/>data_<sp/>+<sp/>offset,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">num_bytes</ref>);</highlight></codeline> |
| <codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="161"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="162" refid="classpaimon_1_1_memory_segment_1a277760850f8db0faf4547109e1e6d2a4" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1a277760850f8db0faf4547109e1e6d2a4" kindref="member">Compare</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">seg2</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">offset1</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">offset2</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">len</ref>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="163"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="164" refid="classpaimon_1_1_memory_segment_1aa4b4baa55491b53307ad81a9f7534d21" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1aa4b4baa55491b53307ad81a9f7534d21" kindref="member">Compare</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">seg2</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">offset1</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">offset2</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">len1</ref>,</highlight></codeline> |
| <codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">len2</ref>)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="166"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="167" refid="classpaimon_1_1_memory_segment_1ac539fedaf28b4910159d225a3e7dced4" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1ac539fedaf28b4910159d225a3e7dced4" kindref="member">EqualTo</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment" kindref="compound">MemorySegment</ref>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">seg2</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">offset1</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">offset2</ref>,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>length)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="168"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="169" refid="classpaimon_1_1_memory_segment_1abf6af375e49268413aafbf01413439cd" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/>std::shared_ptr<Bytes><sp/><ref refid="classpaimon_1_1_memory_segment_1abf6af375e49268413aafbf01413439cd" kindref="member">GetOrCreateHeapMemory</ref>(<ref refid="classpaimon_1_1_memory_pool" kindref="compound">MemoryPool</ref>*<sp/>pool)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(heap_memory_)<sp/>{</highlight></codeline> |
| <codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>heap_memory_;</highlight></codeline> |
| <codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!data_)<sp/>{</highlight></codeline> |
| <codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">;</highlight></codeline> |
| <codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">copy</ref><sp/>=<sp/>std::make_shared<Bytes>(size_,<sp/>pool);</highlight></codeline> |
| <codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::memcpy(</highlight><highlight class="keyword">const_cast<</highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*</highlight><highlight class="keyword">></highlight><highlight class="normal">(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">copy</ref>->data()),<sp/>data_,<sp/>size_);</highlight></codeline> |
| <codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">copy</ref>;</highlight></codeline> |
| <codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="180"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="181"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline> |
| <codeline lineno="183" refid="classpaimon_1_1_memory_segment_1aa174f871ee0ab76781797382d8208ae4" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">explicit</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1aa174f871ee0ab76781797382d8208ae4" kindref="member">MemorySegment</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::shared_ptr<Bytes>&<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">heap_memory</ref>)</highlight></codeline> |
| <codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>:<sp/>heap_memory_(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">heap_memory</ref>),</highlight></codeline> |
| <codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data_(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">heap_memory</ref>->data()),</highlight></codeline> |
| <codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>size_(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">static_cast</ref><<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref>>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">heap_memory</ref>->size()))<sp/>{</highlight></codeline> |
| <codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(heap_memory_);</highlight></codeline> |
| <codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="189"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="191" refid="classpaimon_1_1_memory_segment_1abff7f1aef34507725ce4986cb4b304e8" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classpaimon_1_1_memory_segment_1abff7f1aef34507725ce4986cb4b304e8" kindref="member">MemorySegment</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>data,<sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/>size)</highlight></codeline> |
| <codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>:<sp/>heap_memory_(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">nullptr</ref>),<sp/>data_(data),<sp/>size_(size)<sp/>{</highlight></codeline> |
| <codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">assert</ref>(data<sp/>!=<sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal"><sp/>||<sp/>size<sp/>==<sp/>0);</highlight></codeline> |
| <codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
| <codeline lineno="195"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="196" refid="classpaimon_1_1_memory_segment_1ae105bd280ab93024b74ff9bd29c08043" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/>std::shared_ptr<Bytes><sp/><ref refid="classpaimon_1_1_memory_segment_1ae105bd280ab93024b74ff9bd29c08043" kindref="member">heap_memory_</ref>;</highlight></codeline> |
| <codeline lineno="197" refid="classpaimon_1_1_memory_segment_1a2f53f484fa6fcedd9fb5ac1e7a80c32d" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="classpaimon_1_1_memory_segment_1a2f53f484fa6fcedd9fb5ac1e7a80c32d" kindref="member">data_</ref>;</highlight></codeline> |
| <codeline lineno="198" refid="classpaimon_1_1_memory_segment_1adc785778041cc52b9bb8a7820b6ce5c1" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="classpaimon_1_1_memory_segment_1adc785778041cc52b9bb8a7820b6ce5c1" kindref="member">size_</ref>;</highlight></codeline> |
| <codeline lineno="199"><highlight class="normal">};</highlight></codeline> |
| <codeline lineno="200"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="201"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/><></highlight></codeline> |
| <codeline lineno="202" refid="classpaimon_1_1_memory_segment_1af85c85976e891bdb752d368a6b6c45cf" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a2ce210c7f2a88826dbb9e0a9a847431b" kindref="member">MemorySegment::GetValue</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline> |
| <codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1a75063ceffc750af04502838612f5056e" kindref="member">Get</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>)<sp/>!=<sp/>0;</highlight></codeline> |
| <codeline lineno="204"><highlight class="normal">}</highlight></codeline> |
| <codeline lineno="205"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="206"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/><></highlight></codeline> |
| <codeline lineno="207" refid="classpaimon_1_1_memory_segment_1adcb032b4cafbfb4d1eb18e2a605567c9" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classpaimon_1_1_memory_segment_1ab9dbf9529f2b386532a876127a3109f0" kindref="member">MemorySegment::PutValue</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">int32_t</ref><sp/><ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>value)<sp/>{</highlight></codeline> |
| <codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classpaimon_1_1_memory_segment_1a3fce19b1b1e5c1da996b7c60fde7e69f" kindref="member">Put</ref>(<ref refid="memory__pool_8h_1a147ba4ba34a215b3a4f3a95c1ee11704" kindref="member">index</ref>,<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="keywordtype">char</highlight><highlight class="keyword">></highlight><highlight class="normal">(value<sp/>?<sp/>1<sp/>:<sp/>0));</highlight></codeline> |
| <codeline lineno="209"><highlight class="normal">}</highlight></codeline> |
| <codeline lineno="210"><highlight class="normal"></highlight></codeline> |
| <codeline lineno="211"><highlight class="normal">}<sp/><sp/></highlight><highlight class="comment">//<sp/>namespace<sp/>paimon</highlight><highlight class="normal"></highlight></codeline> |
| </programlisting> |
| <location file="/home/runner/work/paimon-cpp/paimon-cpp/include/paimon/memory/memory_segment.h"/> |
| </compounddef> |
| </doxygen> |