#include <memory.h>
#include <string.h>
/*  SUBROUTINE GET_MEMORY(bytes, address , ierr)
    Jim Beene ORNL 1/94  for PTOLEMY UNIX 
*/

void get_memory_(int *byte, int *addr, int *ierr){

    unsigned size;
    size= ((unsigned) *byte) ;
    *addr= malloc(size);
    if(addr==0){
       *ierr = -1;
    }
    else{
       *ierr=0;
    }
}
/*  SUBROUTINE ZERO_MEMORY(IBYTES,START)
    zero entire hisspace memory block.
*/
void zero_memory_(int *bytes, int *addr){
    int nb;
    int c=0;
    if(*bytes <= 0)
       return;
    else
       nb = *bytes;
    memset(addr,c,nb);
}

