Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 423615
Collapse All | Expand All

(-)file_not_specified_in_diff (-9 / +9 lines)
Line  Link Here
0
-- include/iostream/minmaxheap.h
0
++ include/iostream/minmaxheap.h
Lines 744-750 Link Here
744
  //heap must be empty
744
  //heap must be empty
745
  assert(this->size()==0);
745
  assert(this->size()==0);
746
  for (i = 0; !full() && i<n; i++) {
746
  for (i = 0; !full() && i<n; i++) {
747
    insert(arr[i]);
747
    this->insert(arr[i]);
748
  }
748
  }
749
  if (i < n) {
749
  if (i < n) {
750
    assert(i == this->maxsize);
750
    assert(i == this->maxsize);
Lines 777-789 Link Here
777
777
778
  if(old) {
778
  if(old) {
779
	HeapIndex n = this->size();
779
	HeapIndex n = this->size();
780
	this->A = allocateHeap(this->maxsize);	/* allocate a new array */
780
	this->A = this->allocateHeap(this->maxsize);	/* allocate a new array */
781
	/* copy over the old values */
781
	/* copy over the old values */
782
	assert(this->maxsize > n);
782
	assert(this->maxsize > n);
783
	for(HeapIndex i=0; i<=n; i++) {	/* why extra value? -RW */
783
	for(HeapIndex i=0; i<=n; i++) {	/* why extra value? -RW */
784
	  this->A[i] = old[i];
784
	  this->A[i] = old[i];
785
	}	
785
	}	
786
	freeHeap(old);				/* free up old storage */
786
	this->freeHeap(old);				/* free up old storage */
787
  }
787
  }
788
788
789
}
789
}
790
-- lib/iostream/mm.cc
790
++ lib/iostream/mm.cc
Lines 256-262 Link Here
256
256
257
 
257
 
258
/* ************************************************************ */
258
/* ************************************************************ */
259
void* operator new[] (size_t sz) {
259
void* operator new[] (size_t sz) throw(std::bad_alloc) {
260
  void *p;
260
  void *p;
261
  
261
  
262
  MM_DEBUG cout << "new: sz=" << sz << ", register " 
262
  MM_DEBUG cout << "new: sz=" << sz << ", register " 
Lines 307-313 Link Here
307
307
308
 
308
 
309
/* ************************************************************ */
309
/* ************************************************************ */
310
void* operator new (size_t sz) {
310
void* operator new (size_t sz) throw(std::bad_alloc) {
311
  void *p;
311
  void *p;
312
  
312
  
313
  MM_DEBUG cout << "new: sz=" << sz << ", register " 
313
  MM_DEBUG cout << "new: sz=" << sz << ", register " 
Lines 359-365 Link Here
359
359
360
360
361
/* ---------------------------------------------------------------------- */
361
/* ---------------------------------------------------------------------- */
362
void operator delete (void *ptr)  {
362
void operator delete (void *ptr) throw() {
363
  size_t sz;
363
  size_t sz;
364
  void *p;
364
  void *p;
365
  
365
  
Lines 399-405 Link Here
399
399
400
400
401
/* ---------------------------------------------------------------------- */
401
/* ---------------------------------------------------------------------- */
402
void operator delete[] (void *ptr) {
402
void operator delete[] (void *ptr) throw() {
403
  size_t sz;
403
  size_t sz;
404
  void *p;
404
  void *p;
405
  
405
  

Return to bug 423615