File:  [Research Unix] / researchv8dc / cmd / cfront / libC / new / _new.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv8, HEAD
researchv8 Dan Cross


typedef void (*PFVV)();

extern PFVV _new_handler;

extern void* operator new(long size)
{
	extern char* malloc(unsigned);
	char* p;

	while ( (p=malloc(unsigned(size)))==0 ) {
		if(_new_handler)
			(*_new_handler)();
		else
			return 0;
	}
	return (void*)p;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.