OK, the problem is that make_frame fails to put the arguments into the frame.
I do not (yet) know why not, but that is the problem.
This commit is contained in:
parent
ba985474f6
commit
cb3dcb352e
6 changed files with 23 additions and 8 deletions
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "debug.h"
|
||||
|
|
@ -38,7 +39,8 @@
|
|||
* @return struct pso_pointer a pointer to the newly allocated object
|
||||
*/
|
||||
struct pso_pointer allocate( char *tag, uint8_t size_class ) {
|
||||
struct pso_pointer result = nil;
|
||||
// `t`, because if `allocate_page` fails it will be set to `nil`.
|
||||
struct pso_pointer result = t;
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_printf( DEBUG_ALLOC, 0, L"Allocating object of size class %d with tag `%s`... ", size_class, tag);
|
||||
|
|
@ -49,7 +51,14 @@ struct pso_pointer allocate( char *tag, uint8_t size_class ) {
|
|||
result = allocate_page( size_class );
|
||||
}
|
||||
|
||||
if ( !exceptionp( result ) ) {
|
||||
if (nilp(result)) {
|
||||
fputws( L"FATAL: Page space exhausted\n", stderr );
|
||||
exit(1); // TODO: we don't want to do this! Somehow, we need to
|
||||
// recover a workable environment, ideally by throwing a pre-made
|
||||
// exception.
|
||||
}
|
||||
|
||||
if ( !exceptionp( result ) && !nilp(result)) {
|
||||
result = freelists[size_class];
|
||||
struct pso2 *object = pointer_to_object( result );
|
||||
freelists[size_class] = object->payload.free.next;
|
||||
|
|
@ -69,7 +78,6 @@ struct pso_pointer allocate( char *tag, uint8_t size_class ) {
|
|||
if ( object->header.count != 0 ) {
|
||||
// TODO: return an exception instead? Or warn, set it, and continue?
|
||||
}
|
||||
|
||||
}
|
||||
} // TODO: else throw exception
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue