Lib/v3d/BufferObject.cpp
/**
 * Find assigned blocks within the heap
 *
 * This is a debug method, for testing
 */
Find assigned blocks within the heap
This is a debug method, for testing
Find assigned blocks within the heap This is a debug method for testing
void BufferObject::detect_used_blocks() {
  bool have_block = false;
  for (uint32_t offset = 0; offset < size_word(); ++offset) {
    uint32_t val = (*this)[offset];
    if (have_block) {
      if (val == 0xdeadbeef) {
        printf("block end at %u\n", 4*offset);
        have_block = false;
      }
    } else {
      if (val != 0xdeadbeef) {
        printf("Block at %u, value: %d - %x\n", 4*offset, val, val);
        have_block = true;
      }
    }
  }
}
void BufferObject :: detect_used_blocks ( ) { bool have_block = false ; for ( uint32_t offset = 0 ; offset < size_word ( ) ; ++ offset ) { uint32_t val = ( * this ) [ offset ] ; if ( have_block ) { if ( val == 0xdeadbeef ) { printf ( " \n " , 4 * offset ) ; have_block = false ; } } else { if ( val != 0xdeadbeef ) { printf ( " \n " , 4 * offset , val , val ) ; have_block = true ; } } } }
Find assigned blocks within the heap
 This is a debug method, for testing
Find assigned blocks within the heap This is a debug method for testing