Page 1 of 1

There are other functions to manage memory?

PostPosted: Sun Apr 05, 2009 12:04 pm
by equinox
Hi at ALL,

...is possible ?...or is something imnpossibile?

Tnk1000 for reply.

#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <unistd.h>
#include <asm/page.h>
#include <sys/mman.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/ptrace.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
FILE *mem = NULL;
FILE *output=NULL;
char p[64];
char byte;
unsigned long i = 0;
unsigned long addr, addr2;
int pid = 0;

if(argc < 5)
{
fprintf(stderr, "Usage: %s <start address> <end address> <pid> <output file>\n", argv[0]);
exit(EXIT_FAILURE);
}

addr = strtoul(argv[1], NULL, 16);
addr2 = strtoul(argv[2], NULL, 16);
pid = atoi(argv[3]);
.................ecc.ecc....

Re: Is possible make >DUMP< of memory for save stae game?

PostPosted: Sun Apr 05, 2009 1:31 pm
by makslane
You can't include external files or load external libraries

There are other functions besides these?

PostPosted: Tue Apr 07, 2009 9:21 am
by equinox
CALLOC, FREE, MALLOC, REALLOC
There are other functions besides these IN GE?

Tnk1000 for reply.

Re: There are other functions to manage memory?

PostPosted: Tue Apr 07, 2009 5:39 pm
by pyrometal
No there aren't... But you can build your own functions from these four basic ones that do more complicated operations (like linked lists, etc).