73 if (curlast ==
first-1) {
76 if (idnext == 0)
return idcur;
77 if (idnext->
GetFirst() > last+1)
return idcur;
83 if (curfirst == last+1) {
87 if (
first < curfirst) {
113 tobuf(buffer, version);
115 if (version > 1000) {
130 if (idcur == 0)
return 0;
134 if (nleft == nbytes) {
147 if (idcur1)
return idcur1;
161 std::cout <<
"Free Segment: "<<
fFirst<<
"\t"<<
fLast<<std::endl;
171 if (version > 1000) {
void frombuf(char *&buf, Bool_t *x)
void tobuf(char *&buf, Bool_t x)
void SetFirst(Long64_t first)
TFree()
Default constructor.
Int_t Sizeof() const
return number of bytes occupied by this TFree on permanent storage
virtual void ReadBuffer(char *&buffer)
Decode one free structure from input buffer.
void SetLast(Long64_t last)
void ls(Option_t *="") const override
List free segment contents.
Long64_t GetFirst() const
~TFree() override
Destructor.
Long64_t fLast
Last free word of segment.
static constexpr Version_t Class_Version()
virtual void FillBuffer(char *&buffer)
Encode fre structure into output buffer.
Long64_t fFirst
First free word of segment.
TFree * AddFree(TList *lfree, Long64_t first, Long64_t last)
Add a new free segment to the list of free segments.
TFree * GetBestFree(TList *lfree, Int_t nbytes)
Return the best free segment where to store nbytes.
TObject * After(const TObject *obj) const override
Returns the object after object obj.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.