1. 16 2月, 2015 3 次提交
    • J
      libqos: Update QGuestAllocator to be opaque · f6f363c1
      John Snow 提交于
      To avoid the architecture-specific implementations of the generic qtest
      allocator having to know about fields within the allocator, add a
      page_size setter method for users or arch specializations to use.
      The allocator will assume a default page_size for general use, but it
      can always be overridden.
      
      Since this was the last instance of code directly using properties of the
      QGuestAllocator object directly, modify the type to be opaque and move
      the structure inside of malloc.c.
      
      mlist_new, which was previously exported, is made static local to malloc.c,
      as it has no external users.
      
      [Peter Maydell <peter.maydell@linaro.org> reported the following clang
      warning:
        tests/libqos/malloc.c:35:3: warning:
        redefinition of typedef 'QGuestAllocator' is a C11 feature
              [-Wtypedef-redefinition]
        } QGuestAllocator;
      
      I converted typedef struct ... QGuestAllocator; to struct ...;
      --Stefan]
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarc Marí <marc.mari.barcelo@gmail.com>
      Message-id: 1421698563-6977-7-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f6f363c1
    • J
      libqos: add alloc_init_flags · fa02e608
      John Snow 提交于
      Allow a generic interface to alloc_init_flags,
      not just through pc_alloc_init_flags.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1421698563-6977-6-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fa02e608
    • J
      libqos: Split apart pc_alloc_init · af77f2cd
      John Snow 提交于
      Move the list-specific initialization over into
      malloc.c, to keep all of the list implementation
      details within the same file.
      
      The allocation and freeing of these structures are
      now both back within the same layer.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1421698563-6977-2-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      af77f2cd
  2. 13 1月, 2015 1 次提交
  3. 08 9月, 2014 1 次提交
    • J
      libqos: add a simple first-fit memory allocator · ec2f1605
      John Snow 提交于
      Implement a simple first-fit memory allocator that
      attempts to keep track of leased blocks of memory
      in order to be able to re-use blocks.
      
      Additionally, allow the user to specify when
      initializing the device that upon cleanup,
      we would like to assert that there are no
      blocks in use. This may be useful for identifying
      problems in qtests that use more complicated
      set-up and tear-down routines.
      
      This functionality is used in my upcoming ahci-test v2
      patch set, but I didn't see fit to enable it for any
      existing tests, which will continue to operate the
      same as they have prior.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ec2f1605
  4. 16 8月, 2014 2 次提交
  5. 19 7月, 2013 1 次提交
  6. 17 4月, 2013 1 次提交