mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-24 13:32:41 -08:00
Fatal bug as vmstruct is not allocated
Copied from Perforce Change: 15957 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
129f07e361
commit
df84b151d5
1 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* impl.c.vman: ANSI VM: MALLOC-BASED PSUEDO MEMORY MAPPING
|
||||
*
|
||||
* $HopeName: MMsrc!vman.c(trunk.9) $
|
||||
* $HopeName: MMsrc!vman.c(trunk.10) $
|
||||
* Copyright (C) 1996 Harlequin Group, all rights reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
#include <stdlib.h> /* for malloc and free */
|
||||
#include <string.h> /* for memset */
|
||||
|
||||
SRCID(vman, "$HopeName: MMsrc!vman.c(trunk.9) $");
|
||||
SRCID(vman, "$HopeName: MMsrc!vman.c(trunk.10) $");
|
||||
|
||||
#define SpaceVM(_space) (&(_space)->arenaStruct.vmStruct)
|
||||
|
||||
|
|
@ -41,6 +41,11 @@ Res VMCreate(Space *spaceReturn, Size size, Addr base)
|
|||
AVER(size != 0);
|
||||
AVER(base == NULL);
|
||||
|
||||
space = (Space)malloc(sizeof(SpaceStruct));
|
||||
if(space == NULL)
|
||||
return ResMEMORY;
|
||||
vm = SpaceVM(space);
|
||||
|
||||
/* Note that because we add VMAN_ALIGN rather than */
|
||||
/* VMAN_ALIGN-1 we are not in danger of overflowing */
|
||||
/* vm->limit even if malloc were peverse enough to give us */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue