Changeset 5e3e42c7 in mainline for uspace/lib/ipcgfx/src/server.c


Ignore:
Timestamp:
2020-06-16T10:52:38Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
94f3747
Parents:
3e640e5
git-author:
Jiri Svoboda <jiri@…> (2020-06-15 17:31:57)
git-committer:
Jiri Svoboda <jiri@…> (2020-06-16 10:52:38)
Message:

IPC GC server needs to destroy area it shared in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ipcgfx/src/server.c

    r3e640e5 r5e3e42c7  
    164164            (unsigned) srvbmp->bmp_id);
    165165
     166        /* We created the memory area by sharing it in */
     167        srvbmp->myalloc = true;
     168        srvbmp->pixels = pixels;
     169
    166170        async_answer_1(icall, EOK, srvbmp->bmp_id);
    167171}
     
    246250        srvbmp->bmp = bitmap;
    247251        srvbmp->bmp_id = srvgc->next_bmp_id++;
     252
     253        /* Area allocated by backing GC, we just shared it out */
     254        srvbmp->myalloc = false;
     255        srvbmp->pixels = alloc.pixels; // Not really needed
     256
    248257        printf("gc_bitmap_create_doutput_srv: storing bmp_id=%u\n",
    249258            (unsigned) srvbmp->bmp_id);
     
    271280                return;
    272281        }
     282
     283        if (bitmap->myalloc)
     284                as_area_destroy(bitmap->pixels);
    273285
    274286        list_remove(&bitmap->lbitmaps);
Note: See TracChangeset for help on using the changeset viewer.