Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for heap_len (0.07 sec)

  1. src/cmd/link/internal/ld/outbuf.go

    		}
    		// See if our heap would grow to be too large, and if so, copy it to the end
    		// of the mmapped area.
    		if heapLen > maxOutBufHeapLen && out.copyHeap() {
    			heapPos -= heapLen
    			lenNeeded = heapPos + lenToWrite
    			heapLen = 0
    		}
    		out.heap = append(out.heap, make([]byte, lenNeeded-heapLen)...)
    	}
    	return heapPos, out.heap
    }
    
    func (out *OutBuf) SeekSet(p int64) {
    	out.off = p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 19:51:29 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/outbuf_test.go

    	}
    }
    
    // TestWriteLoc ensures that the math surrounding writeLoc is correct.
    func TestWriteLoc(t *testing.T) {
    	tests := []struct {
    		bufLen          int
    		off             int64
    		heapLen         int
    		lenToWrite      int64
    		expectedHeapLen int
    		writePos        int64
    		addressInHeap   bool
    	}{
    		{100, 0, 0, 100, 0, 0, false},
    		{100, 100, 0, 100, 100, 0, true},
    		{10, 10, 0, 100, 100, 0, true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 08 20:03:01 UTC 2021
    - 2.2K bytes
    - Viewed (0)
Back to top