- updated simulation
This commit is contained in:
@@ -50,6 +50,13 @@
|
||||
#include <hostLib.h>
|
||||
#include <inetLib.h>
|
||||
#include <sysLib.h>
|
||||
#ifdef MEN_A012
|
||||
/*
|
||||
#include <MEN/men_typs.h>
|
||||
#include <sysLib_men.h>
|
||||
*/
|
||||
extern PART_ID sysHighMemPart;
|
||||
#endif
|
||||
#include <tickLib.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -63,6 +70,8 @@
|
||||
#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#include <vme.h>
|
||||
|
||||
|
||||
/*
|
||||
**==================== Global Definitions =====================================
|
||||
*/
|
||||
@@ -1588,12 +1597,20 @@
|
||||
|
||||
if (n_extra_bytes != 0) free (my_rqst);
|
||||
|
||||
#ifdef MEN_A012
|
||||
Hist_base_addr = NULL;
|
||||
printf("Calling memPartAlloc with %d, %d\n",
|
||||
(int)sysHighMemPart, Total_bytes);
|
||||
Hist_base_addr = memPartAlloc(sysHighMemPart,Total_bytes);
|
||||
Hist_base_MEN_alloc = 1;
|
||||
#else
|
||||
i = memFindMax (); /* Get size of biggest free memory block */
|
||||
if (i > Total_bytes) {
|
||||
Hist_base_addr = calloc (Total_bytes, sizeof (char));
|
||||
}else {
|
||||
Hist_base_addr = NULL;
|
||||
}
|
||||
#endif
|
||||
printf("Successfully allocated %d bytes\n", Total_bytes);
|
||||
if (Hist_base_addr == NULL) {
|
||||
printf ("\007do_SQHM__PSD_alloc:\n"
|
||||
@@ -3071,7 +3088,16 @@
|
||||
/*
|
||||
** Release any allocated histogram buffer
|
||||
*/
|
||||
free (Hist_base_addr);
|
||||
#ifdef MEN_A012
|
||||
if(Hist_base_MEN_alloc == 1){
|
||||
memPartFree(sysHighMemPart, Hist_base_addr);
|
||||
} else {
|
||||
free (Hist_base_addr);
|
||||
}
|
||||
Hist_base_MEN_alloc = 0;
|
||||
#else
|
||||
free(Hist_base_addr);
|
||||
#endif
|
||||
Hist_base_addr = NULL;
|
||||
free (Frame_base_addr);
|
||||
Frame_base_addr = NULL;
|
||||
|
||||
Reference in New Issue
Block a user