|
|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 539 (0x21b)
Types: TextFile
Notes: UNIX file
Names: »_prof.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
└─⟦f4b8d8c84⟧ UNIX Filesystem
└─⟦this⟧ »libc/crt/_prof.c«
/*
* Called from the run-time start-off to enable profiling and to
* write out the final profiling information.
*/
#include <stdio.h>
#include <types.h>
#define STDERR 2
_profon()
{
register unsigned bufl;
register short *buf;
extern etext();
static char emsg[] = "No room for profil buffer\n";
bufl = (unsigned)etext / 2;
buf = (short *)sbrk(bufl * sizeof (short));
if (buf == NULL) {
write(STDERR, emsg, sizeof emsg);
abort();
}
monitor((vaddr_t)1, (vaddr_t)etext, buf, bufl);
}
_profoff()
{
monitor(NULL);
}