You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
332 B
23 lines
332 B
/*
|
|
* Below is the given application for lab2_2.
|
|
*/
|
|
|
|
#include "user_lib.h"
|
|
#include "util/types.h"
|
|
|
|
struct my_structure {
|
|
char c;
|
|
int n;
|
|
};
|
|
|
|
int main(void) {
|
|
struct my_structure* s = (struct my_structure*)naive_malloc();
|
|
s->c = 'a';
|
|
s->n = 1;
|
|
|
|
printu("s: %lx, {%c %d}\n", s, s->c, s->n);
|
|
|
|
naive_free(s);
|
|
exit(0);
|
|
}
|