This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] mmalloc() -> xmmalloc()


Last one.
	Andrew
2001-12-02  Andrew Cagney  <ac131313@redhat.com>

	* jv-lang.c (get_java_class_symtab): Use xmmalloc instead of
	mmalloc.

Index: jv-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-lang.c,v
retrieving revision 1.10
diff -p -r1.10 jv-lang.c
*** jv-lang.c	2001/12/02 22:08:47	1.10
--- jv-lang.c	2001/12/02 22:39:36
*************** get_java_class_symtab (void)
*** 115,124 ****
  
        /* Allocate GLOBAL_BLOCK.  This has to be relocatable. */
        class_symtab_space = 128;
!       bl = (struct block *)
! 	mmalloc (objfile->md,
! 		 sizeof (struct block)
! 		 + ((class_symtab_space - 1) * sizeof (struct symbol *)));
        *bl = *BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
        BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl;
        class_symtab->free_ptr = (char *) bl;
--- 115,123 ----
  
        /* Allocate GLOBAL_BLOCK.  This has to be relocatable. */
        class_symtab_space = 128;
!       bl = xmmalloc (objfile->md,
! 		     sizeof (struct block)
! 		     + ((class_symtab_space - 1) * sizeof (struct symbol *)));
        *bl = *BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
        BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl;
        class_symtab->free_ptr = (char *) bl;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]