Memz create

From The iPhone Wiki
Revision as of 05:23, 11 March 2010 by Posixninja (talk | contribs) (New page: ==Decompilation== #define kMemzImageContainer 0x4D656D7A MemzDescriptor* memz_create(unsigned char* address, unsigned int size, unsigned int flags) { MemzDescriptor* memz ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Decompilation

#define kMemzImageContainer 0x4D656D7A

MemzDescriptor* memz_create(unsigned char* address, unsigned int size, unsigned int flags) {
    MemzDescriptor* memz = (MemzDescriptor*) malloc(sizeof(MemzDescriptor));
    if(memz != NULL) {
        memz->fileSize = size;
        memz->imageSize = size;
        memz->type = kMemzImageContainer;
        memz->flags = flags;
        memz->address = address;
    }
    return memz;
}