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

Block interrupts during malloc #10258

Closed
jdemeyer opened this issue Nov 13, 2010 · 10 comments
Closed

Block interrupts during malloc #10258

jdemeyer opened this issue Nov 13, 2010 · 10 comments

Comments

@jdemeyer
Copy link

Allow to temporarily suspend interrupts and do this in sage_malloc() and friends (an interrupt during malloc() will mess up the heap, this happens sometimes with a "fixed" #9564!)

Patch chain: #9678, #10061, #10258, #10030, #10018, #9640

Component: c_lib

Keywords: malloc sage_malloc

Author: Jeroen Demeyer

Reviewer: Volker Braun

Merged: sage-4.7.alpha1

Issue created by migration from https://trac.sagemath.org/ticket/10258

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer self-assigned this Nov 13, 2010
@jdemeyer
Copy link
Author

Changed keywords from malloc sage_malloc c_lib to malloc sage_malloc

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@vbraun
Copy link
Member

vbraun commented Jan 21, 2011

comment:5

Nice!

There are some examples in the documentation that use malloc, for example doc/en/numerical_sage/ctypes_examples.rst. We should convert these to sage_malloc as well, probably in #10109.

@vbraun
Copy link
Member

vbraun commented Jan 21, 2011

Reviewer: Volker Braun

@jdemeyer
Copy link
Author

comment:6

Replying to @vbraun:

Nice!

There are some examples in the documentation that use malloc, for example doc/en/numerical_sage/ctypes_examples.rst. We should convert these to sage_malloc as well, probably in #10109.

You are right that some documentation uses malloc. But that seems to be pure C code. So changing malloc to sage_malloc would imply linking against -Lcsage and possibly adding some sig_on()/sig_off() machinery and possibly more complications...

@jdemeyer
Copy link
Author

jdemeyer commented Feb 4, 2011

Attachment: 10258_sage_malloc.patch.gz

@jdemeyer
Copy link
Author

jdemeyer commented Feb 4, 2011

comment:7

Rebased patch

@jdemeyer jdemeyer modified the milestones: sage-4.6.2, sage-4.7 Feb 7, 2011
@jdemeyer
Copy link
Author

jdemeyer commented Mar 8, 2011

Merged: sage-4.7.alpha1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants