1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: TemplateNLMISC::CBlockMemory< T, __ctor_dtor__ > class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"> <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NLMISC::CBlockMemory< T, __ctor_dtor__ > Class Template Reference</h1><code>#include <<a class="el" href="a05490.html">block_memory.h</a>></code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class T, bool __ctor_dtor__ = true><br>
class NLMISC::CBlockMemory< T, __ctor_dtor__ ></h3>
Block memory allocation<p>
This memory manager is a fast memory allocator, doing same thing as new/delete. It works by block. block are always allocated, never deleted. alocation/free are in O(1).<p>
Elements with sizeof(T)<sizeof(void*) should not be used with this allocator, because sizeEltInMemory= max(sizeof(T),sizeof(void*)).<p>
<a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya5">free()</a> check invalid ptr in debug only, for extra cost of 8 octets per element.<p>
NB: if template parameter __ctor_dtor__ is false, then ctor and dtor are not called when an element is <a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate()</a>-ed or deallocate()-ed.<p>
<dl compact><dt><b>Author:</b></dt><dd>Lionel Berenguier <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00065">65</a> of file <a class="el" href="a05490.html">block_memory.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya0">__stl_alloc_changeEltSize</a> (<a class="el" href="a04558.html#a15">uint</a> eltSize)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya1">__stl_alloc_getEltSize</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>T * </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya2">allocate</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">allocate an element. ctor is called. <a href="#NLMISC_1_1CBlockMemorya2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya3">CBlockMemory</a> (const <a class="el" href="a02274.html">CBlockMemory</a>< T, __ctor_dtor__ > &other)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya4">CBlockMemory</a> (<a class="el" href="a04558.html#a15">uint</a> blockSize=16)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLMISC_1_1CBlockMemorya4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya5">free</a> (T *ptr)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">delete an element allocated with this manager. dtor is called. NULL is tested. <a href="#NLMISC_1_1CBlockMemorya5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya6">purge</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya7">~CBlockMemory</a> ()</td></tr>
<tr><td colspan=2><br><h2>Private Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryy2">TCheckIdent</a> { <a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy0">CheckAllocatedIdent</a> = 0x01234567,
<a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy1">CheckDeletedIdent</a> = 0x89ABCDEF
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">For debug only, check ident. <a href="#NLMISC_1_1CBlockMemoryy2">More...</a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryd0">buildBlock</a> (<a class="el" href="a02275.html">CBlock</a> &block)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryd1">releaseBlock</a> (<a class="el" href="a02275.html">CBlock</a> &block)</td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::list< <a class="el" href="a02275.html">CBlock</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">list of blocks. <a href="#NLMISC_1_1CBlockMemoryr0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr1">_BlockSize</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">size of a block. <a href="#NLMISC_1_1CBlockMemoryr1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">size of an element in the block. <a href="#NLMISC_1_1CBlockMemoryr2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02516.html">CFastMutex</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Must be ThreadSafe (eg: important for 3D PointLight and list of transform). <a href="#NLMISC_1_1CBlockMemoryr3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr4">_NAllocatedElts</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">number of elements allocated. <a href="#NLMISC_1_1CBlockMemoryr4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void * </td><td class="memItemRight" valign=bottom><a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">next free element. <a href="#NLMISC_1_1CBlockMemoryr5"></a><br><br></td></tr>
</table>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="NLMISC_1_1CBlockMemoryy2" doxytag="NLMISC::CBlockMemory::TCheckIdent" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> enum <a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryy2">NLMISC::CBlockMemory::TCheckIdent</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
For debug only, check ident.
<p>
<dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="anchor" name="NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy0" doxytag="CheckAllocatedIdent" ></a>CheckAllocatedIdent</em> </td><td>
</td></tr>
<tr><td valign=top><em><a class="anchor" name="NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy1" doxytag="CheckDeletedIdent" ></a>CheckDeletedIdent</em> </td><td>
</td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="a05490.html#l00260">260</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00260 { <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy0">CheckAllocatedIdent</a>= 0x01234567, <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy1">CheckDeletedIdent</a>= 0x89ABCDEF };
</pre></div> </td>
</tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="NLMISC_1_1CBlockMemorya4" doxytag="NLMISC::CBlockMemory::CBlockMemory" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html">CBlockMemory</a> </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td>
<td class="mdname1" valign="top" nowrap> <em>blockSize</em> = 16 </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Constructor.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00070">70</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00071 {
00072 <a class="code" href="a04199.html#a6">nlassert</a>(blockSize);
00073 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr1">_BlockSize</a>= blockSize;
00074 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>= std::max(<span class="keyword">sizeof</span>(T), <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*));
00075 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>= NULL;
00076 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr4">_NAllocatedElts</a>= 0;
00077 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemorya3" doxytag="NLMISC::CBlockMemory::CBlockMemory" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html">CBlockMemory</a> </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="a02274.html">CBlockMemory</a>< T, __ctor_dtor__ > & </td>
<td class="mdname1" valign="top" nowrap> <em>other</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00079">79</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00080 {
00081 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr1">_BlockSize</a>= other._BlockSize;
00082 <span class="comment">// if other block is rebinded, don't copy its rebinded size.</span>
00083 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>= std::max(<span class="keyword">sizeof</span>(T), <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*));
00084 <span class="comment">// No elts allocated</span>
00085 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>= NULL;
00086 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr4">_NAllocatedElts</a>= 0;
00087 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemorya7" doxytag="NLMISC::CBlockMemory::~CBlockMemory" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::~<a class="el" href="a02274.html">CBlockMemory</a> </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya6">purge()</a>
<p>
Definition at line <a class="el" href="a05490.html#l00090">90</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00091 {
00092 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemorya6">purge</a>();
00093 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLMISC_1_1CBlockMemorya0" doxytag="NLMISC::CBlockMemory::__stl_alloc_changeEltSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::__stl_alloc_changeEltSize </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td>
<td class="mdname1" valign="top" nowrap> <em>eltSize</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00209">209</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00210 {
00211 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.enter();
00212
00213 <span class="comment">// must not be used with object ctor/dtor behavior.</span>
00214 <a class="code" href="a04199.html#a6">nlassert</a>(__ctor_dtor__ == <span class="keyword">false</span>);
00215 <span class="comment">// format size.</span>
00216 eltSize= std::max(eltSize, <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*));
00217 <span class="comment">// if not the same size as before</span>
00218 <span class="keywordflow">if</span>(<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>!= eltSize)
00219 {
00220 <span class="comment">// verify that rebind is made before any allocation!!</span>
00221 <a class="code" href="a04199.html#a6">nlassert</a>(<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.empty());
00222 <span class="comment">// change the size.</span>
00223 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>= eltSize;
00224 }
00225
00226 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.leave();
00227 };
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemorya1" doxytag="NLMISC::CBlockMemory::__stl_alloc_getEltSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::__stl_alloc_getEltSize </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00229">229</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00230 {
00231 <span class="keywordflow">return</span> <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>;
00232 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemorya2" doxytag="NLMISC::CBlockMemory::allocate" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> T* <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::allocate </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
allocate an element. ctor is called.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00097">97</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00098 {
00099 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.enter();
00100
00101 <span class="comment">// if not enough memory, aloc a block.</span>
00102 <span class="keywordflow">if</span>(!<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>)
00103 {
00104 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.push_front(CBlock());
00105 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryd0">buildBlock</a>(*<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.begin());
00106 <span class="comment">// new free elt points to the beginning of this block.</span>
00107 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>= (*<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.begin()).Data;
00108 <span class="preprocessor">#ifdef NL_DEBUG</span>
00109 <span class="preprocessor"></span> <span class="comment">// if debug, must decal for begin check.</span>
00110 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>= (<a class="code" href="a04558.html#a11">uint32</a>*)<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a> + 1;
00111 <span class="preprocessor">#endif</span>
00112 <span class="preprocessor"></span> }
00113
00114 <span class="comment">// choose next free elt.</span>
00115 <a class="code" href="a04199.html#a6">nlassert</a>(_NextFreeElt);
00116 T* ret= (T*)<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>;
00117
00118 <span class="comment">// update _NextFreeElt, so it points to the next free element.</span>
00119 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>= *(<span class="keywordtype">void</span>**)<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>;
00120
00121 <span class="comment">// construct the allocated element.</span>
00122 <span class="keywordflow">if</span>( __ctor_dtor__ )
00123 <span class="preprocessor">#undef new</span>
00124 <span class="preprocessor"></span> <span class="keyword">new</span> (ret) T;
00125 <span class="preprocessor">#define new NL_NEW</span>
00126 <span class="preprocessor"></span>
00127
00128 <span class="comment">// some simple Check.</span>
00129 <span class="preprocessor">#ifdef NL_DEBUG</span>
00130 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> *checkStart= (<a class="code" href="a04558.html#a11">uint32</a>*)(<span class="keywordtype">void</span>*)ret-1;
00131 <a class="code" href="a04558.html#a11">uint32</a> *checkEnd = (<a class="code" href="a04558.html#a11">uint32</a>*)((<a class="code" href="a04558.html#a7">uint8</a>*)(<span class="keywordtype">void</span>*)ret+<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>);
00132 <a class="code" href="a04199.html#a6">nlassert</a>( *checkStart == CheckDeletedIdent);
00133 <a class="code" href="a04199.html#a6">nlassert</a>( *checkEnd == CheckDeletedIdent);
00134 <span class="comment">// if ok, mark this element as allocated.</span>
00135 *checkStart= <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy0">CheckAllocatedIdent</a>;
00136 *checkEnd = CheckAllocatedIdent;
00137 <span class="preprocessor">#endif</span>
00138 <span class="preprocessor"></span>
00139 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr4">_NAllocatedElts</a>++;
00140
00141 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.leave();
00142
00143 <span class="keywordflow">return</span> ret;
00144 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemoryd0" doxytag="NLMISC::CBlockMemory::buildBlock" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::buildBlock </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02275.html">CBlock</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>block</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00264">264</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
Referenced by <a class="el" href="a05490.html#l00097">NLMISC::CBlockMemory< CNode >::allocate()</a>.
<p>
<div class="fragment"><pre>00265 {
00266 <a class="code" href="a04558.html#a15">uint</a> i;
00267 <a class="code" href="a04558.html#a11">uint32</a> nodeSize= <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>;
00268 <span class="preprocessor">#ifdef NL_DEBUG</span>
00269 <span class="preprocessor"></span> <span class="comment">// must allocate more size for mem checks in debug.</span>
00270 nodeSize+= 2*<span class="keyword">sizeof</span>(<a class="code" href="a04558.html#a11">uint32</a>);
00271 <span class="preprocessor">#endif</span>
00272 <span class="preprocessor"></span>
00273 <span class="comment">// allocate.</span>
00274 block.Data = (<span class="keywordtype">void</span>*)<span class="keyword">new</span> <a class="code" href="a04558.html#a7">uint8</a> [<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr1">_BlockSize</a> * nodeSize];
00275
00276 <span class="comment">// by default, all elements are not allocated, build the list of free elements.</span>
00277 <span class="keywordtype">void</span> *ptr= block.Data;
00278 <span class="preprocessor">#ifdef NL_DEBUG</span>
00279 <span class="preprocessor"></span> <span class="comment">// if debug, must decal for begin check.</span>
00280 ptr= (<a class="code" href="a04558.html#a11">uint32</a>*)ptr + 1;
00281 <span class="preprocessor">#endif</span>
00282 <span class="preprocessor"></span> <span class="keywordflow">for</span>(i=0; i<<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr1">_BlockSize</a>-1; i++)
00283 {
00284 <span class="comment">// next elt.</span>
00285 <span class="keywordtype">void</span> *next= (<a class="code" href="a04558.html#a7">uint8</a>*)ptr + nodeSize;
00286 <span class="comment">// points to the next element in this array.</span>
00287 *(<span class="keywordtype">void</span>**)ptr= next;
00288 <span class="comment">// next.</span>
00289 ptr= next;
00290 }
00291 <span class="comment">// last element points to NULL.</span>
00292 *(<span class="keywordtype">void</span>**)ptr= NULL;
00293
00294
00295 <span class="comment">// If debug, must init all check values to CheckDeletedIdent.</span>
00296 <span class="preprocessor">#ifdef NL_DEBUG</span>
00297 <span class="preprocessor"></span> ptr= block.Data;
00298 <span class="comment">// must decal for begin check.</span>
00299 ptr= (<a class="code" href="a04558.html#a11">uint32</a>*)ptr + 1;
00300 <span class="comment">// fill all nodes.</span>
00301 <span class="keywordflow">for</span>(i=0; i<<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr1">_BlockSize</a>; i++)
00302 {
00303 <a class="code" href="a04558.html#a11">uint32</a> *checkStart= (<a class="code" href="a04558.html#a11">uint32</a>*)ptr-1;
00304 <a class="code" href="a04558.html#a11">uint32</a> *checkEnd = (<a class="code" href="a04558.html#a11">uint32</a>*)((<a class="code" href="a04558.html#a7">uint8</a>*)ptr+_EltSize);
00305 <span class="comment">// mark this element as deleted.</span>
00306 *checkStart= <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy1">CheckDeletedIdent</a>;
00307 *checkEnd = CheckDeletedIdent;
00308
00309 <span class="comment">// next elt.</span>
00310 ptr= (<a class="code" href="a04558.html#a7">uint8</a>*)ptr + nodeSize;
00311 }
00312 <span class="preprocessor">#endif</span>
00313 <span class="preprocessor"></span>
00314 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemorya5" doxytag="NLMISC::CBlockMemory::free" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::free </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">T * </td>
<td class="mdname1" valign="top" nowrap> <em>ptr</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
delete an element allocated with this manager. dtor is called. NULL is tested.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00147">147</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
<div class="fragment"><pre>00148 {
00149 <span class="keywordflow">if</span>(!ptr)
00150 <span class="keywordflow">return</span>;
00151
00152 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.enter();
00153
00154 <span class="comment">// some simple Check.</span>
00155 <a class="code" href="a04199.html#a6">nlassert</a>(_NAllocatedElts>0);
00156 <span class="preprocessor">#ifdef NL_DEBUG</span>
00157 <span class="preprocessor"></span> <a class="code" href="a04558.html#a11">uint32</a> *checkStart= (<a class="code" href="a04558.html#a11">uint32</a>*)(<span class="keywordtype">void</span>*)ptr-1;
00158 <a class="code" href="a04558.html#a11">uint32</a> *checkEnd = (<a class="code" href="a04558.html#a11">uint32</a>*)((<a class="code" href="a04558.html#a7">uint8</a>*)(<span class="keywordtype">void</span>*)ptr+<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a>);
00159 <a class="code" href="a04199.html#a6">nlassert</a>( *checkStart == CheckAllocatedIdent);
00160 <a class="code" href="a04199.html#a6">nlassert</a>( *checkEnd == CheckAllocatedIdent);
00161 <span class="comment">// if ok, mark this element as deleted.</span>
00162 *checkStart= <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryy2NLMISC_1_1CBlockMemoryy1">CheckDeletedIdent</a>;
00163 *checkEnd = CheckDeletedIdent;
00164 <span class="preprocessor">#endif</span>
00165 <span class="preprocessor"></span>
00166 <span class="comment">// destruct the element.</span>
00167 <span class="keywordflow">if</span>( __ctor_dtor__ )
00168 ptr->~T();
00169
00170 <span class="comment">// just append this freed element to the list.</span>
00171 *(<span class="keywordtype">void</span>**)ptr= <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>;
00172 _NextFreeElt= (<span class="keywordtype">void</span>*) ptr;
00173
00174 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr4">_NAllocatedElts</a>--;
00175
00176 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.leave();
00177 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemorya6" doxytag="NLMISC::CBlockMemory::purge" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::purge </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
delete all blocks, freeing all memory. It is an error to <a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya6">purge()</a> or delete a <a class="el" href="a02274.html">CBlockMemory</a>, while elements still remains!! You must free your elements with <a class="el" href="a02274.html#NLMISC_1_1CBlockMemorya5">free()</a>. NB: you can disable this assert if you set NL3D_BlockMemoryAssertOnPurge to false (good to quit a program quickly without uninitialize).
<p>
Definition at line <a class="el" href="a05490.html#l00185">185</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
Referenced by <a class="el" href="a05490.html#l00090">NLMISC::CBlockMemory< CNode >::~CBlockMemory()</a>.
<p>
<div class="fragment"><pre>00186 {
00187 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.enter();
00188
00189 <span class="keywordflow">if</span>(<a class="code" href="a05378.html#a4">NL3D_BlockMemoryAssertOnPurge</a>)
00190 <a class="code" href="a04199.html#a6">nlassert</a>(_NAllocatedElts==0);
00191
00192 <span class="keywordflow">while</span>(<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.begin()!=<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.end())
00193 {
00194 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryd1">releaseBlock</a>(*<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.begin());
00195 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.erase(<a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a>.begin());
00196 }
00197
00198 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a>= NULL;
00199 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr4">_NAllocatedElts</a>= 0;
00200
00201 <a class="code" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a>.leave();
00202 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemoryd1" doxytag="NLMISC::CBlockMemory::releaseBlock" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::releaseBlock </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02275.html">CBlock</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>block</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00315">315</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
Referenced by <a class="el" href="a05490.html#l00185">NLMISC::CBlockMemory< CNode >::purge()</a>.
<p>
<div class="fragment"><pre>00316 {
00317 <span class="keyword">delete</span> [] ((<a class="code" href="a04558.html#a7">uint8</a>*)block.Data);
00318 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLMISC_1_1CBlockMemoryr0" doxytag="NLMISC::CBlockMemory::_Blocks" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> std::list<<a class="el" href="a02275.html">CBlock</a>> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr0">_Blocks</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
list of blocks.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00256">256</a> of file <a class="el" href="a05490.html">block_memory.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemoryr1" doxytag="NLMISC::CBlockMemory::_BlockSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr1">_BlockSize</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
size of a block.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00237">237</a> of file <a class="el" href="a05490.html">block_memory.h</a>.
<p>
Referenced by <a class="el" href="a05490.html#l00079">NLMISC::CBlockMemory< CNode >::CBlockMemory()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemoryr2" doxytag="NLMISC::CBlockMemory::_EltSize" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr2">_EltSize</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
size of an element in the block.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00239">239</a> of file <a class="el" href="a05490.html">block_memory.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemoryr3" doxytag="NLMISC::CBlockMemory::_Mutex" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a02516.html">CFastMutex</a> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr3">_Mutex</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Must be ThreadSafe (eg: important for 3D PointLight and list of transform).
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00245">245</a> of file <a class="el" href="a05490.html">block_memory.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemoryr4" doxytag="NLMISC::CBlockMemory::_NAllocatedElts" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr4">_NAllocatedElts</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
number of elements allocated.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00241">241</a> of file <a class="el" href="a05490.html">block_memory.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLMISC_1_1CBlockMemoryr5" doxytag="NLMISC::CBlockMemory::_NextFreeElt" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<class T, bool __ctor_dtor__ = true> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void* <a class="el" href="a02274.html">NLMISC::CBlockMemory</a>< T, __ctor_dtor__ >::<a class="el" href="a02274.html#NLMISC_1_1CBlockMemoryr5">_NextFreeElt</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
next free element.
<p>
<p>
Definition at line <a class="el" href="a05490.html#l00243">243</a> of file <a class="el" href="a05490.html">block_memory.h</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a05490.html">block_memory.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:05:13 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>
|