Changes between Version 5 and Version 7 of Ticket #10257


Ignore:
Timestamp:
12/14/14 16:46:11 (7 years ago)
Author:
jdemeyer
Comment:

New commits:

f81f349Add memory functions

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10257

    • Property Status changed from new to needs_review
    • Property Authors changed from to Jeroen Demeyer
    • Property Branch changed from to u/jdemeyer/ticket/10257
    • Property Commit changed from to f81f34909df2a6b2fba91c895b81ce66f8066435
  • Ticket #10257 – Description

    v5 v7  
    1 We should use `sage_malloc()`/`sage_free()` everywhere instead of plain `malloc()`/`free()`.
    2 
    3 We should also introduce `_check` variants which `raise MemoryError` upon failure.
     1We should introduce `check_` variants of the Sage memory functions which `raise MemoryError` upon failure.
    42
    53I also propose to add a BSD-inspired [http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3?query=reallocarray&arch=i386 sage_reallocarray()] function.
     4
     5Attached branch introduces the functions and uses them in a few places as proof of concept.