Previous 199869 Revisions Next

r29175 Wednesday 2nd April, 2014 at 07:45:17 UTC by Miodrag Milanović
Fix memory leak visible apollo driver (nw)
[src/emu/bus/isa]3c505.c 3c505.h

trunk/src/emu/bus/isa/3c505.c
r29174r29175
473473   m_size = RX_FIFO_SIZE; // size;
474474   for (i = 0; i < m_size; i++)
475475   {
476      m_db[i] = new data_buffer();
476      m_db[i] = global_alloc(data_buffer());
477477      m_db[i]->start(device, db_size);
478478   }
479479}
r29174r29175
485485   m_count = 0;
486486}
487487
488threecom3c505_device::data_buffer_fifo::~data_buffer_fifo()
489{
490   for (int i = 0; i < m_size; i++)
491   {
492      global_free(m_db[i]);
493   }
494}
495
488496int threecom3c505_device::data_buffer_fifo::put(const UINT8 data[], const int length)
489497{
490498   UINT16 next_index = (m_put_index + 1) % m_size;
trunk/src/emu/bus/isa/3c505.h
r29174r29175
175175   {
176176   public:
177177      data_buffer_fifo();
178      ~data_buffer_fifo();
178179      void start(threecom3c505_device *device, INT32 size, INT32 db_size);
179180      void reset();
180181      int put(const UINT8 data[], const int length);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team