+2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
+ * dv-nvram.c (attach_nvram_regs): Use hw_free and hw_malloc
+ instead of free and malloc.
+
2000-09-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* Makefile.in: Was missing from initial patch.
controller->attach_space = attach_space;
controller->base_address = attach_address;
- controller->eeprom = (char*) malloc (attach_size + 1);
+ controller->eeprom = (char*) hw_malloc (me, attach_size + 1);
controller->eeprom_min_cycles = 10000;
controller->size = attach_size + 1;
controller->mapped = 0;
case NVRAM_SAVE_MODIFIED:
case NVRAM_SAVE_ALL:
- controller->data = (char*) malloc (attach_size);
+ controller->data = (char*) hw_malloc (me, attach_size);
if (controller->data == 0)
hw_abort (me, "Not enough memory, try to use the mode 'map'");
if (result != attach_size)
{
oerrno = errno;
- free (controller->data);
+ hw_free (me, controller->data);
close (controller->fd);
errno = oerrno;
hw_abort (me, "Failed to save the ram content");
if (result != attach_size)
{
oerrno = errno;
- free (controller->data);
+ hw_free (me, controller->data);
close (controller->fd);
errno = oerrno;
hw_abort (me, "Failed to load the ram content");