#ifndef __MYMEMORY__H_
#define __MYMEMORY__H_ "My memory managing module\n"

#define __USE_CTYPE_H__

#include "include/glbtypes.h"
#include "include/glbproto.h"
#include "include/globvars.h"

void PTR my_malloc(unsigned long howmuch)
{
void PTR allocated;
if (!howmuch)
	return NULL;
#ifdef TARGET_SYSTEM_DOS
allocated=farmalloc(howmuch);
#else
allocated=calloc(howmuch,1);
#endif
if(allocated==NULL)
	{
	printf("my_malloc(%ld) failed !\n",howmuch);
/*	while(kbhit()) getch(); */
	printf("Continue execution ? (Y/N)");
/*	while(!kbhit()); */
	if(toupper(getchar())=='Y')
		puts("");/* New line */
	else
		exit(1);
	};
memset(allocated,0,howmuch);
return allocated;
}
#endif
