\doxysection{vectorspace.\+c}
\hypertarget{vectorspace_8c_source}{}\label{vectorspace_8c_source}\index{workspace/post-\/scarcity/src/memory/vectorspace.c@{workspace/post-\/scarcity/src/memory/vectorspace.c}}
\mbox{\hyperlink{vectorspace_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00001}00001\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00002}00002\ \textcolor{comment}{\ *\ \ vectorspace.c}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00003}00003\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00004}00004\ \textcolor{comment}{\ *\ \ Structures\ common\ to\ all\ vector\ space\ objects.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00005}00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00006}00006\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00007}00007\ \textcolor{comment}{\ *\ \ (c)\ 2017\ Simon\ Brooke\ <simon@journeyman.cc>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00008}00008\ \textcolor{comment}{\ *\ \ Licensed\ under\ GPL\ version\ 2.0,\ or,\ at\ your\ option,\ any\ later\ version.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00009}00009\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00010}00010\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00011}00011\ \textcolor{preprocessor}{\#include\ <math.h>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00012}00012\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00013}00013\ \textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00014}00014\ \textcolor{preprocessor}{\#include\ <string.h>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00015}00015\ \textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00016}00016\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00017}00017\ \textcolor{comment}{\ *\ wide\ characters}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00018}00018\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00019}00019\ \textcolor{preprocessor}{\#include\ <wchar.h>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00020}00020\ \textcolor{preprocessor}{\#include\ <wctype.h>}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00021}00021\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00022}00022\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{conspage_8h}{memory/conspage.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00023}00023\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{consspaceobject_8h}{memory/consspaceobject.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00024}00024\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{debug_8h}{debug.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00025}00025\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{hashmap_8h}{memory/hashmap.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00026}00026\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{stack_8h}{memory/stack.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00027}00027\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{vectorspace_8h}{memory/vectorspace.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00028}00028\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{intern_8h}{ops/intern.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00029}00029\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00030}00030\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00031}00031\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00032}00032\ \textcolor{comment}{\ *\ Make\ a\ cons\_space\_object\ which\ points\ to\ the\ vector\_space\_object}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00033}00033\ \textcolor{comment}{\ *\ with\ this\ \`{}tag`\ at\ this\ \`{}address`.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00034}00034\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00035}00035\ \textcolor{comment}{\ *\ @address\ the\ address\ of\ the\ vector\_space\_object\ to\ point\ to.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00036}00036\ \textcolor{comment}{\ *\ @tag\ the\ vector-\/space\ tag\ of\ the\ particular\ type\ of\ vector-\/space\ object,}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00037}00037\ \textcolor{comment}{\ *\ NOT\ \`{}VECTORPOINTTV`.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00038}00038\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00039}00039\ \textcolor{comment}{\ *\ @return\ a\ cons\_pointer\ to\ the\ object,\ or\ NIL\ if\ the\ object\ could\ not\ be}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00040}00040\ \textcolor{comment}{\ *\ allocated\ due\ to\ memory\ exhaustion.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00041}00041\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00042}\mbox{\hyperlink{vectorspace_8c_a680df55eeac54d8e9b14be3b414db236}{00042}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{vectorspace_8c_a680df55eeac54d8e9b14be3b414db236}{make\_vec\_pointer}}(\ struct\ \mbox{\hyperlink{vectorspace_8h_structvector__space__object}{vector\_space\_object}}\ *address,}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00043}00043\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ tag\ )\ \{}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00044}00044\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}Entered\ make\_vec\_pointer\(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00045}00045\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ pointer\ =\ \mbox{\hyperlink{conspage_8c_a04ba7c874b05e9789d0aca9ee6b106a7}{allocate\_cell}}(\ \mbox{\hyperlink{consspaceobject_8h_a0e422043a4797ec1a81f7460486e09da}{VECTORPOINTTV}}\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00046}00046\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ *cell\ =\ \&\mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ pointer\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00047}00047\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00048}00048\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00049}00049\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}make\_vec\_pointer:\ tag\ written,\ about\ to\ set\ pointer\ address\ to\ \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00050}00050\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ address\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00051}00051\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00052}00052\ \ \ \ \ cell-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.vectorp.address\ =\ address;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00053}00053\ \ \ \ \ cell-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.vectorp.\mbox{\hyperlink{consspaceobject_8h_a21cb645ce4ae20308447dcd59534bf38}{tag}}.value\ =\ \mbox{\hyperlink{consspaceobject_8h_a21cb645ce4ae20308447dcd59534bf38}{tag}};}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00054}00054\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00055}00055\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00056}00056\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}make\_vec\_pointer:\ all\ good,\ returning\ pointer\ to\ \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00057}00057\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cell-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.vectorp.address\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00058}00058\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00059}00059\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa0ffa929ddbce890ce4f81264a211233}{debug\_dump\_object}}(\ pointer,\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00060}00060\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00061}00061\ \ \ \ \ \textcolor{keywordflow}{return}\ pointer;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00062}00062\ \}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00063}00063\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00064}00064\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00065}00065\ \textcolor{comment}{\ *\ Allocate\ a\ vector\ space\ object\ with\ this\ \`{}payload\_size`\ and\ \`{}tag`,}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00066}00066\ \textcolor{comment}{\ *\ and\ return\ a\ \`{}cons\_pointer`\ which\ points\ to\ an\ object\ whigh\ points\ to\ it.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00067}00067\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00068}00068\ \textcolor{comment}{\ *\ @tag\ the\ vector-\/space\ tag\ of\ the\ particular\ type\ of\ vector-\/space\ object,}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00069}00069\ \textcolor{comment}{\ *\ NOT\ \`{}VECTORPOINTTAG`.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00070}00070\ \textcolor{comment}{\ *\ @payload\_size\ the\ size\ of\ the\ payload\ required,\ in\ bytes.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00071}00071\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00072}00072\ \textcolor{comment}{\ *\ @return\ a\ cons\_pointer\ to\ the\ object,\ or\ NIL\ if\ the\ object\ could\ not\ be}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00073}00073\ \textcolor{comment}{\ *\ allocated\ due\ to\ memory\ exhaustion.}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00074}00074\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00075}\mbox{\hyperlink{vectorspace_8c_af82611898537d85117224ce5d4c5eeb5}{00075}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{vectorspace_8c_af82611898537d85117224ce5d4c5eeb5}{make\_vso}}(\ uint32\_t\ tag,\ uint64\_t\ payload\_size\ )\ \{}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00076}00076\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}Entered\ make\_vso\(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00077}00077\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result\ =\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}};}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00078}00078\ \ \ \ \ int64\_t\ total\_size\ =\ \textcolor{keyword}{sizeof}(\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{vectorspace_8h_structvector__space__header}{vector\_space\_header}}\ )\ +\ payload\_size;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00079}00079\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00080}00080\ \ \ \ \ \textcolor{comment}{/*\ Pad\ size\ to\ 64\ bit\ words.\ This\ is\ intended\ to\ promote\ access\ efficiancy}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00081}00081\ \textcolor{comment}{\ \ \ \ \ *\ on\ 64\ bit\ machines\ but\ may\ just\ be\ voodoo\ coding\ */}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00082}00082\ \ \ \ \ uint64\_t\ padded\ =\ ceil(\ (\ total\_size\ *\ 8.0\ )\ /\ 8.0\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00083}00083\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}make\_vso:\ about\ to\ malloc\(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00084}00084\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{vectorspace_8h_structvector__space__object}{vector\_space\_object}}\ *vso\ =\ malloc(\ padded\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00085}00085\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00086}00086\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ vso\ !=\ NULL\ )\ \{}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00087}00087\ \ \ \ \ \ \ \ \ memset(\ vso,\ 0,\ padded\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00088}00088\ \ \ \ \ \ \ \ \ vso-\/>\mbox{\hyperlink{vectorspace_8h_ab85f7d1e94d2f1083b6ce5a136c859f2}{header}}.\mbox{\hyperlink{vectorspace_8h_ad427b8802abb07e6d40728768115d127}{tag}}.value\ =\ tag;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00089}00089\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00090}00090\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00091}00091\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}make\_vso:\ written\ tag\ '\%4.4s'\ into\ vso\ at\ \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00092}00092\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vso-\/>\mbox{\hyperlink{vectorspace_8h_ab85f7d1e94d2f1083b6ce5a136c859f2}{header}}.\mbox{\hyperlink{vectorspace_8h_ad427b8802abb07e6d40728768115d127}{tag}}.bytes,\ vso\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00093}00093\ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{vectorspace_8c_a680df55eeac54d8e9b14be3b414db236}{make\_vec\_pointer}}(\ vso,\ tag\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00094}00094\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa0ffa929ddbce890ce4f81264a211233}{debug\_dump\_object}}(\ result,\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00095}00095\ \ \ \ \ \ \ \ \ vso-\/>\mbox{\hyperlink{vectorspace_8h_ab85f7d1e94d2f1083b6ce5a136c859f2}{header}}.\mbox{\hyperlink{vectorspace_8h_ac84e775f971dbab6f3ac08fdd378e797}{vecp}}\ =\ result;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00096}00096\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ memcpy(vso-\/>header.vecp,\ result,\ sizeof(struct\ cons\_pointer));}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00097}00097\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00098}00098\ \ \ \ \ \ \ \ \ vso-\/>\mbox{\hyperlink{vectorspace_8h_ab85f7d1e94d2f1083b6ce5a136c859f2}{header}}.\mbox{\hyperlink{vectorspace_8h_af931a8871310b4dad23f0f0b0f623560}{size}}\ =\ payload\_size;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00099}00099\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00100}00100\ \textcolor{preprocessor}{\#ifdef\ DEBUG}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00101}00101\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00102}00102\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}Allocated\ vector-\/space\ object\ of\ type\ \%4.4s,\ total\ size\ \%ld,\ payload\ size\ \%ld,\ at\ address\ \%p,\ payload\ address\ \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00103}00103\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&vso-\/>\mbox{\hyperlink{vectorspace_8h_ab85f7d1e94d2f1083b6ce5a136c859f2}{header}}.\mbox{\hyperlink{vectorspace_8h_ad427b8802abb07e6d40728768115d127}{tag}}.bytes,\ total\_size,\ vso-\/>\mbox{\hyperlink{vectorspace_8h_ab85f7d1e94d2f1083b6ce5a136c859f2}{header}}.\mbox{\hyperlink{vectorspace_8h_af931a8871310b4dad23f0f0b0f623560}{size}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00104}00104\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ vso,\ \&vso-\/>\mbox{\hyperlink{vectorspace_8h_a52100a8d038844c00250f5356f1b9a3f}{payload}}\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00105}00105\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ padded\ !=\ total\_size\ )\ \{}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00106}00106\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},\ L\textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)tPadded\ from\ \%d\ to\ \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00107}00107\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ total\_size,\ padded\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00108}00108\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00109}00109\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00110}00110\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00111}00111\ \textcolor{preprocessor}{\#ifdef\ DEBUG}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00112}00112\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00113}00113\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}make\_vso:\ all\ good,\ returning\ pointer\ to\ \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00114}00114\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ result\ ).payload.vectorp.address\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00115}00115\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00116}00116\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00117}00117\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00118}00118\ \}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00119}00119\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00120}00120\ \textcolor{comment}{/**\ for\ vector\ space\ pointers,\ free\ the\ actual\ vector-\/space}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00121}00121\ \textcolor{comment}{\ *\ object.\ Dangerous!\ */}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00122}00122\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00123}\mbox{\hyperlink{vectorspace_8c_a7d4b938413ff59e1e8c4e6966d86ad38}{00123}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{vectorspace_8c_a7d4b938413ff59e1e8c4e6966d86ad38}{free\_vso}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ pointer\ )\ \{}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00124}00124\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ cell\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ pointer\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00125}00125\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00126}00126\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},\ L\textcolor{stringliteral}{"{}About\ to\ free\ vector-\/space\ object\ at\ 0x\%lx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00127}00127\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cell.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.vectorp.address\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00128}00128\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{vectorspace_8h_structvector__space__object}{vector\_space\_object}}\ *vso\ =\ cell.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.vectorp.address;}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00129}00129\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00130}00130\ \ \ \ \ \textcolor{keywordflow}{switch}\ (\ vso-\/>\mbox{\hyperlink{vectorspace_8h_ab85f7d1e94d2f1083b6ce5a136c859f2}{header}}.\mbox{\hyperlink{vectorspace_8h_ad427b8802abb07e6d40728768115d127}{tag}}.value\ )\ \{}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00131}00131\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{vectorspace_8h_a845017e723bca337605494a0b9be6d5c}{HASHTV}}:}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00132}00132\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{intern_8c_a5b4f547c810b3a1ca5e7e6bbdc8df92b}{free\_hashmap}}(\ pointer\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00133}00133\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00134}00134\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \mbox{\hyperlink{stack_8h_a4ee879be4822abe5825ec13126557e40}{STACKFRAMETV}}:}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00135}00135\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{stack_8c_ad9c6f148f705d561caa12cd7d64d4016}{free\_stack\_frame}}(\ \mbox{\hyperlink{stack_8c_a81653b4495f0fd4e7e49b9bd99e8e8db}{get\_stack\_frame}}(\ pointer\ )\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00136}00136\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00137}00137\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00138}00138\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00139}00139\ \textcolor{comment}{//\ \ free(\ (void\ *)cell.payload.vectorp.address\ );}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00140}00140\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},\ L\textcolor{stringliteral}{"{}Freed\ vector-\/space\ object\ at\ 0x\%lx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00141}00141\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cell.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.vectorp.address\ );}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00142}00142\ \}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00143}00143\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00144}00144\ \textcolor{comment}{//\ bool\ check\_vso\_tag(\ struct\ cons\_pointer\ pointer,\ char\ *\ tag)\ \{}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00145}00145\ \textcolor{comment}{//\ \ \ \ \ bool\ result\ =\ false;}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00146}00146\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00147}00147\ \textcolor{comment}{//\ \ \ \ \ if\ (check\_tag(pointer,\ VECTORPOINTTAG))\ \{}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00148}00148\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ struct\ vector\_space\_object\ *\ vso\ =\ pointer\_to\_vso(pointer);}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00149}00149\ \textcolor{comment}{//\ \ \ \ \ \ \ \ \ result\ =\ strncmp(\ vso-\/>header.tag.bytes[0],\ tag,\ TAGLENGTH);}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00150}00150\ \textcolor{comment}{//\ \ \ \ \ \}}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00151}00151\ }
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00152}00152\ \textcolor{comment}{//\ \ \ \ \ return\ result;}}
\DoxyCodeLine{\Hypertarget{vectorspace_8c_source_l00153}00153\ \textcolor{comment}{//\ \}}}

\end{DoxyCode}
