/** This is the function called from _start which is the environment * initialization code. It's responsibility is to zero the bss sections, * call the global constructors, set up the command line parameters, * etc, etc. * * This function then calls the standard main entry point with the * command line parameters. * */ int spoon_start( uint32 eax, uint32 ebx, uint32 ecx, uint32 edx ) { int32 ans; int pcount; int i; char **parmlist; zero_bss(); smk_init_console(); call_ctors(); pcount = 0; parmlist = NULL; parmlist = spoon_parse_parameters( &pcount, (char*)edx ); ans = main( pcount , parmlist ); if ( parmlist != NULL ) { for ( i = 0; i < pcount; i++) smk_mem_free( parmlist[i] ); smk_mem_free( parmlist ); } call_dtors(); return ans; }
int liballoc_free(void* ptr,int pages) { smk_mem_free( ptr ); return 0; }