-
+ 14911A5F1DF993EADE542652D5D20431017A872CAD0A367DE56BA0164564F68A58FA5E846A3835F601A055762D203B7866879937B59F51A2710EC45A4157CB5B
cryostat/README.TXT
(0 . 0)(1 . 93)
10 ------------------------------------------------------------------------------
11 ------------------------------------------------------------------------------
12 -- This file is part of 'Cryostat', an Ada library for persistent storage. --
13 -- --
14 -- (C) 2020 Stanislav Datskovskiy ( www.loper-os.org ) --
15 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
16 -- --
17 -- You do not have, nor can you ever acquire the right to use, copy or --
18 -- distribute this software ; Should you use this software for any purpose, --
19 -- or copy and distribute it to anyone or in any manner, you are breaking --
20 -- the laws of whatever soi-disant jurisdiction, and you promise to --
21 -- continue doing so for the indefinite future. In any case, please --
22 -- always : read and understand any software ; verify any PGP signatures --
23 -- that you use - for any purpose. --
24 ------------------------------------------------------------------------------
25 ------------------------------------------------------------------------------
26
27 ------------------------------------------------------------------------------
28 "Cryostat" is a Fits-in-Head minimal library for adding persistent storage to
29 Ada data structures. It uses the MMap() system call, present in Linux (kernel
30 2.4 and newer) and all compatible operating systems.
31
32 Cryostat does NOT require enabling the use of pointerism, the secondary stack,
33 heap, or other bulky and objectionable GNAT features, in the calling program.
34 It does however require "finalization" to be enabled. This is used to
35 guarantee the safe sync-to-disk and closing of the backing MMap when the
36 data structure it contains goes out of scope.
37
38 See introductory article : http://www.loper-os.org/?p=3791
39 ------------------------------------------------------------------------------
40
41 ------------------------------------------------------------------------------
42 BUILD, TEST :
43 ------------------------------------------------------------------------------
44
45 cd demo
46 gprbuild
47 ./bin/cryodemo
48
49 Will produce this output :
50
51 T(0) before : 0
52 T(Last) before : 0
53 T(0) after : 1
54 T(Last) after : 1
55 OK.
56
57 On a second invocation :
58
59 T(0) before : 1
60 T(Last) before : 1
61 T(0) after : 2
62 T(Last) after : 2
63 OK.
64
65 ... on the N-th invocation :
66
67 T(0) before : N-1
68 T(Last) before : N-1
69 T(0) after : N
70 T(Last) after : N
71 OK.
72
73 "cryotest.bin", the demo backing file, will consist of 512 megabytes of
74 byte value N, where N is the number of times the demo has executed.
75
76 E.g. after the first execution of "cryodemo" ,
77
78 $ hexdump -C cryotest.bin
79
80 00000000 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................|
81 *
82 20000000
83
84 ------------------------------------------------------------------------------
85 TODO (as of version 633037) :
86 ------------------------------------------------------------------------------
87
88 1) Add support for offsetted maps, and for maps which do not span the entire
89 length of their backing file; likewise support runtime expansion of the
90 backing file.
91
92 2) Currently, Cryostat is C-free. However, if added a .C for pulling constants
93 from system headers, instead of the hardcoded MMap() flag values
94 currently in unix.ads, could support architectures where non-standard values
95 are used for these; in particular, MIPS32, MIPS64; and possibly others.
96 See also: http://logs.nosuchlabs.com/log/trilema/2018-10-24#1865524
97
98 3) Add support for "anonymous" (i.e. not backed to disk storage) MMap, as a
99 cleaner (when using large data structures) replacement for Ada's standard
100 heap mechanism.
101
102 ------------------------------------------------------------------------------