Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit python memory leak usage #46904

Closed
kevin3210 mannequin opened this issue Apr 17, 2008 · 3 comments
Closed

64 bit python memory leak usage #46904

kevin3210 mannequin opened this issue Apr 17, 2008 · 3 comments
Labels
performance Performance or resource usage

Comments

@kevin3210
Copy link
Mannequin

kevin3210 mannequin commented Apr 17, 2008

BPO 2652
Nosy @gpshead, @amauryfa, @pitrou
Files
  • data.log: guppy heap information for each iteration
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2009-05-10.20:54:39.195>
    created_at = <Date 2008-04-17.22:26:08.166>
    labels = ['invalid', 'performance']
    title = '64 bit python  memory leak usage'
    updated_at = <Date 2009-05-10.20:54:39.193>
    user = 'https://bugs.python.org/kevin3210'

    bugs.python.org fields:

    activity = <Date 2009-05-10.20:54:39.193>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-05-10.20:54:39.195>
    closer = 'pitrou'
    components = []
    creation = <Date 2008-04-17.22:26:08.166>
    creator = 'kevin3210'
    dependencies = []
    files = ['10051']
    hgrepos = []
    issue_num = 2652
    keywords = []
    message_count = 3.0
    messages = ['65596', '65603', '87544']
    nosy_count = 4.0
    nosy_names = ['gregory.p.smith', 'amaury.forgeotdarc', 'pitrou', 'kevin3210']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue2652'
    versions = ['Python 2.5']

    @kevin3210
    Copy link
    Mannequin Author

    kevin3210 mannequin commented Apr 17, 2008

    For the code below.. memory usage keeps increasing continuously.. This
    does not happen in a 32-bit machine python build. i think it might be
    the datetime module where the problem might be..

    linux kernel version (both on 32-bit and 64 bit machine)
    linux - 2.6.24.4-64.fc8
    python version (both on 32-bit and 64 bit machine)
    Python 2.5.1 (r251:54863, Oct 30 2007, 13:45:26)

    now = datetime.datetime.now()
    oneday = datetime.timedelta(days=1)
    
    def birthdaycompare(a, b):
       if a is None and b:
           return 1
       if a and b is None:
           return -1
       if a is None and b is None:
           return 0
       if a<b:
           return -1
       elif a==b:
           return 0
       else:
           return 1
    
    def compare_by(fieldname):
       def comparedict(a,b):
           return birthdaycompare(a[fieldname], b[fieldname])
       return comparedict
    
    def getbirthdays(friend_details):
       new_f = []
       birthday = None
       birthday_dt = None
       for f in friend_details:
           if f.has_key('birthday'):
               birthday = f['birthday']
           if birthday and birthday !='':
               birthday_split = birthday.split(',')[0]
               if birthday_split == 'February 29':
                   birthday = 'February 28'
               try:
                   birthday_dt =
    datetime.datetime.strptime(birthday_split + ', ' + str(now.year) , '%B
    %d, %Y')
                   if birthday_dt < (now - oneday):
                       birthday_dt =
    datetime.datetime.strptime(birthday_split + ', ' + str(now.year+1) ,
    '%B %d, %Y')
               except:
                   birthday=None
                   birthday_dt=None
       f['birthday'] = birthday
       f['birthday_dt'] = birthday_dt
       new_f.append(f)
    

    new_f.sort(compare_by('birthday_dt'))

    @kevin3210 kevin3210 mannequin added the performance Performance or resource usage label Apr 17, 2008
    @amauryfa
    Copy link
    Member

    Please provide a "main" function to test with.
    I tried to write one based on your code; but memory usage was stable
    after a few seconds.

    @pitrou
    Copy link
    Member

    pitrou commented May 10, 2009

    Closing since no further information was given about the workload.

    @pitrou pitrou closed this as completed May 10, 2009
    @pitrou pitrou added the invalid label May 10, 2009
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants