mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
CFileHelpers: Rework FileBuf handling
FileBuf: Reserve memory only when it is needed (copyFile) copyFile: Reserve for small files, only as much memory as is required
This commit is contained in:
@@ -84,10 +84,11 @@ struct helpersDebugInfo {
|
||||
class CFileHelpers
|
||||
{
|
||||
private:
|
||||
unsigned long FileBufSize;
|
||||
char *FileBuf;
|
||||
uint32_t FileBufMaxSize;
|
||||
int fd1, fd2;
|
||||
|
||||
char* initFileBuf(char* buf, uint32_t size);
|
||||
char* deleteFileBuf(char* buf);
|
||||
bool ConsoleQuiet;
|
||||
helpersDebugInfo DebugInfo;
|
||||
void setDebugInfo(const char* msg, const char* file, const char* func, int line);
|
||||
|
Reference in New Issue
Block a user