MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / RecVolumes5

Method RecVolumes5

Libraries/unrar/recvol5.cpp:3–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1static const uint MaxVolumes=65535;
2
3RecVolumes5::RecVolumes5(RAROptions *Cmd,bool TestOnly)
4{
5 RealBuf=NULL;
6 RealReadBuffer=NULL;
7
8 DataCount=0;
9 RecCount=0;
10 TotalCount=0;
11 RecBufferSize=0;
12
13#ifdef RAR_SMP
14 MaxUserThreads=Cmd->Threads;
15#else
16 MaxUserThreads=1;
17#endif
18
19 ThreadData=new RecRSThreadData[MaxUserThreads];
20 for (uint I=0;I<MaxUserThreads;I++)
21 {
22 ThreadData[I].RecRSPtr=this;
23 ThreadData[I].RS=NULL;
24 }
25
26 if (TestOnly)
27 {
28#ifdef RAR_SMP
29 RecThreadPool=NULL;
30#endif
31 }
32 else
33 {
34#ifdef RAR_SMP
35 RecThreadPool=new ThreadPool(MaxUserThreads);
36#endif
37 RealBuf=new byte[TotalBufferSize+SSE_ALIGNMENT];
38 Buf=(byte *)ALIGN_VALUE(RealBuf,SSE_ALIGNMENT);
39 }
40}
41
42
43RecVolumes5::~RecVolumes5()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected