Subversion Repositories freemyipod

Rev

Rev 472 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 472 Rev 473
Line 881... Line 881...
881
    
881
    
882
    @command()
882
    @command()
883
    def free(self, ptr):
883
    def free(self, ptr):
884
        """ Frees the memory space pointed to by 'ptr' """
884
        """ Frees the memory space pointed to by 'ptr' """
885
        self.logger.debug("Freeing the memory region at 0x%x\n" % ptr)
885
        self.logger.debug("Freeing the memory region at 0x%x\n" % ptr)
886
        return self.lib.monitorcommand(struct.pack("IIII", 56, addr, 0, 0), "III", (None, None, None))
886
        return self.lib.monitorcommand(struct.pack("IIII", 56, ptr, 0, 0), "III", (None, None, None))
-
 
887
    
-
 
888
    @command()
-
 
889
    def free_all(self):
-
 
890
        """ Frees all memory allocations created by the monitor thread """
-
 
891
        self.logger.debug("Freeing all memory allocations created by the monitor thread\n")
-
 
892
        return self.lib.monitorcommand(struct.pack("IIII", 57, 0, 0, 0), "III", (None, None, None))
887
    
893
    
888
 
894
 
889
class Lib(object):
895
class Lib(object):
890
    def __init__(self, logger):
896
    def __init__(self, logger):
891
        self.logger = logger
897
        self.logger = logger