summaryrefslogtreecommitdiffstats
path: root/qemu-malloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Format per CODING_STYLEmalc2009-05-191-6/+10
| | | | Signed-off-by: malc <av1474@comtv.ru>
* Abort on attempts to allocate zero bytesmalc2009-05-191-2/+7
| | | | | | http://marc.info/?t=124267873300015&r=1&w=2 Signed-off-by: malc <av1474@comtv.ru>
* Fix qemu_realloc() (Kevin Wolf)aliguori2009-02-111-1/+4
| | | | | | | | | | For qemu_realloc with size == 0 a result of NULL is perfectly fine Signed-off-by: Kevin Wolf <kwolf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6615 c046a42c-6fe2-441c-8c8c-71466251a162
* Replace exit() in oom_check with abort()aliguori2009-02-061-1/+1
| | | | | | | | | | So that we can get a core dump with a stack trace. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6542 c046a42c-6fe2-441c-8c8c-71466251a162
* Terminate emulation on memory allocation failure (Avi Kivity)aliguori2009-02-051-6/+10
| | | | | | | | | | | | | | | | | Memory allocation failures are a very rare condition on virtual-memory hosts. They are also very difficult to handle correctly (especially in a hardware emulation context). Because of this, it is better to gracefully terminate emulation rather than executing untested or even unwritten recovery code paths. This patch changes the qemu memory allocation routines to terminate emulation if an allocation failure is encountered. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6526 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_strndup: qemu_strdup with length limit.balrog2008-11-091-1/+15
| | | | | | | | Also optimise qemu_strdup by using memcpy - using pstrcpy is usually suboptimal. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix error introduced by r5044blueswir12008-08-251-1/+1
| | | | | | | | | qemu_strdup() doesn't copy a last character because of off by one error. Signed-off-by: Gleb Natapov <gleb@qumranet.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5086 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix OpenBSD linker warningsblueswir12008-08-211-2/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_realloc(), by Gerd Hoffmann.ths2008-08-061-0/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
* Prevent guest reusing host memory allocations.pbrook2008-06-091-0/+59
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4710 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud