Dev/server malloc check (#1023)

* usleep in communication to actually relay the err message of memory allocation to the client (weird but test for now), function in server to handle memory allcoation issues (updates mess, ret and sendsit to the client and returns prior from function implementatin, setting fnum in client for the speicific functions that send to detector each argument separtely, they need to remember the fnum else they throw with the incorrect fnum
* server: every malloc must check if it succeeded, rearranging so that the free is clear as well (only in funcs so far)
* fixed malloc checks in other places other than funcs.c
This commit is contained in:
2024-11-18 09:46:21 +01:00
committed by GitHub
parent 5088e5a205
commit e1497f9cb9
14 changed files with 353 additions and 282 deletions

View File

@ -140,7 +140,7 @@ void checkVirtual9MFlag();
void setupFebBeb();
#endif
#if defined(EIGERD) || defined(MYTHEN3D)
void allocateDetectorStructureMemory();
int allocateDetectorStructureMemory();
#endif
void setupDetector();
#if defined(CHIPTESTBOARDD)

View File

@ -11,6 +11,8 @@
// initialization functions
int updateModeAllowedFunction(int file_des);
int printSocketReadError();
int sendError(int file_des);
void setMemoryAllocationErrorMessage();
void init_detector();
int decode_function(int);
const char *getRetName();