Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/Unipisa/CMM
13 July 2022, 09:41:13 UTC
  • Code
  • Branches (2)
  • Releases (8)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/SourceCode
    • refs/heads/master
    • 1.9
    • 1.8
    • 1.7
    • 1.6
    • 1.5
    • 1.4
    • 1.3
    • 1.1
  • db1a798
  • /
  • patch
  • /
  • patch-2
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
  • release
origin badgecontent badge Iframe embedding
swh:1:cnt:51c9f869bf0923812bb75e2a16828d116a40d39b
origin badgedirectory badge Iframe embedding
swh:1:dir:d3ff9e31e4383eadb7d32ad4579ad403c9d1c2a8
origin badgerevision badge
swh:1:rev:55778ad8b99c136e1886959c1f1333c776df14e1
origin badgesnapshot badge
swh:1:snp:4ac4ed834489429d51fc0fd004f10ddbf78d807a
origin badgerelease badge
swh:1:rel:a6a00f689665e8e5b730fb4706b03c463146259a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
  • release
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 55778ad8b99c136e1886959c1f1333c776df14e1 authored by Giuseppe Attardi on 15 May 1997, 06:24:54 UTC
1.8 -
Tip revision: 55778ad
patch-2
diff -c cmm/ChangeLog /project/posso/cmm/cmm/ChangeLog
*** cmm/ChangeLog	Wed Dec 18 20:57:31 1996
--- /project/posso/cmm/cmm/ChangeLog	Wed Dec 18 14:01:55 1996
***************
*** 1,15 ****
- Wed Dec 18 17:07:57 1996  Giuseppe Attardi  <attardi@omega>
- 
- 	* cmm.cpp (CmmInit): heap rounding requires cast to (Word) for
-         usage with mmap.
- 
  Wed Dec 18 12:02:09 1996  Pietro Iglio  <iglio@di.unipi.it>
  
! 	* cmm.cpp (emptyStableSpace): check for empty queue
! 	* test7.cpp (class Item): added public to CmmObject
  
  Sun Dec 15 20:04:45 1996  Giuseppe Attardi  <attardi@omega>
! 
  	* msw.cpp (mswAlloc, mswAllocOpaque): added casts:
  	*(Byte *)(freeList-1) = TransparentMask;
  	*(Byte *)(ret-2) = OpaqueMask
--- 1,10 ----
  Wed Dec 18 12:02:09 1996  Pietro Iglio  <iglio@di.unipi.it>
  
! 	* Fixed bug in cmm.cpp:emptyStableSpace()
! 	* Changed test7.cpp such that it can be compiled with gcc 2.7
  
  Sun Dec 15 20:04:45 1996  Giuseppe Attardi  <attardi@omega>
! 	
  	* msw.cpp (mswAlloc, mswAllocOpaque): added casts:
  	*(Byte *)(freeList-1) = TransparentMask;
  	*(Byte *)(ret-2) = OpaqueMask
diff -c cmm/cmm.cpp /project/posso/cmm/cmm/cmm.cpp
*** cmm/cmm.cpp	Wed Dec 18 21:22:12 1996
--- /project/posso/cmm/cmm/cmm.cpp	Wed Dec 18 13:41:34 1996
***************
*** 550,556 ****
    globalHeapStart = heap;
  #endif
    heap = heap + bytesPerPage - 1;
!   heap -= (Word)heap % bytesPerPage;
    firstHeapPage = GCPtoPage(heap);
    lastHeapPage = firstHeapPage + heapSpanPages - 1;
    firstTablePage = lastHeapPage + 1;
--- 550,556 ----
    globalHeapStart = heap;
  #endif
    heap = heap + bytesPerPage - 1;
!   heap -= (long)heap % bytesPerPage;
    firstHeapPage = GCPtoPage(heap);
    lastHeapPage = firstHeapPage + heapSpanPages - 1;
    firstTablePage = lastHeapPage + 1;
***************
*** 584,589 ****
--- 584,594 ----
    /* Initialize tables */
    for (i = firstHeapPage ; i <= lastHeapPage ; i++)
      pageHeap[i] = NOHEAP;
+ 
+ # ifdef _WIN32
+   pageLink[0] = 0;	// _WIN32 malloc does not clear. Needed for expandHeap
+ # endif
+ 
    fromSpace = UNALLOCATEDSPACE + 1;
    nextSpace = fromSpace;
    firstFreePage = firstHeapPage;
***************
*** 686,692 ****
    inc_heap = ::new char[inc_totalPages*bytesPerPage + bytesPerPage - 1];
    if (inc_heap == NULL) goto fail;
    inc_heap = inc_heap + bytesPerPage - 1;
!   inc_heap -= (Word)inc_heap % bytesPerPage;
    inc_firstHeapPage = GCPtoPage(inc_heap);
    inc_lastHeapPage = inc_firstHeapPage + inc_totalPages - 1;
    new_firstHeapPage = MIN(firstHeapPage,
--- 691,697 ----
    inc_heap = ::new char[inc_totalPages*bytesPerPage + bytesPerPage - 1];
    if (inc_heap == NULL) goto fail;
    inc_heap = inc_heap + bytesPerPage - 1;
!   inc_heap -= (int)inc_heap % bytesPerPage;
    inc_firstHeapPage = GCPtoPage(inc_heap);
    inc_lastHeapPage = inc_firstHeapPage + inc_totalPages - 1;
    new_firstHeapPage = MIN(firstHeapPage,
***************
*** 806,823 ****
   * -- emptyStableSpace
   *
   * Moves the pages in StableSpace, up to end, into the FromSpace.
!  * A total collection is performed by calling this before calling collect().
!  * When generational collection is not desired, this is called after
!  * collection to empty the StableSpace.
   *
   *---------------------------------------------------------------------------*/
  
  static void
  emptyStableSpace(page end)
  {
    page scan;
-   if (queueHead == 0)		// happens in test3
-     return;
    end = pageLink[end];
    while (queueHead != end)
      {
--- 811,828 ----
   * -- emptyStableSpace
   *
   * Moves the pages in StableSpace, up to end, into the FromSpace.
!  * A total collection is performed by calling this before calling
!  * collect().  When generational collection is not desired, this is called
!  * after collection to empty the StableSpace.
   *
   *---------------------------------------------------------------------------*/
  
  static void
  emptyStableSpace(page end)
  {
+   if (queueHead == 0) return;
+ 
    page scan;
    end = pageLink[end];
    while (queueHead != end)
      {
***************
*** 877,884 ****
      {
  #     ifdef MARKING
        CmmObject *bp = basePointer(cp);
!       page = GCPtoPage(bp);
!       if (OUTSIDE_HEAPS(page))
  	return;
        MARK(bp);
  #     endif
--- 882,889 ----
      {
  #     ifdef MARKING
        CmmObject *bp = basePointer(cp);
!       unsigned bpp = GCPtoPage(bp);
!       if (OUTSIDE_HEAPS(bpp))
  	return;
        MARK(bp);
  #     endif
diff -c cmm/cmm.h /project/posso/cmm/cmm/cmm.h
*** cmm/cmm.h	Wed Dec 18 17:35:47 1996
--- /project/posso/cmm/cmm/cmm.h	Sun Dec 15 19:40:02 1996
***************
*** 132,157 ****
  
     Arrays of collected objects
     ---------------------------
!    Class CmmArray can be used to create arrays of CmmObject's as follows.
!    To create an array of objects of class Item, overload the new() operator
!    for class Item:
!   
!   	void*
!   	Item::operator new[](size_t size)
!   	{
!   	  return sizeof(size_t) + (char*)new(size) CmmArray<Item>;
!   	}
!   
!    Then you can create arrays of Item normally, for instance:
!   
!   	Item* anArrayOfItems = new Item[20];
!   
!    The constructor for class Item with no argument will be called for
!    each Item in the array.
!    Such arrays can be used normally, e.g.:
!   
!   	anArrayOfItems[i].print();
!   	Item anItem = anArrayOfItems[3];
  
     Caveats
     -------
--- 132,142 ----
  
     Arrays of collected objects
     ---------------------------
!    Garbage collected arrays of garbage collected objects can be created
!    by using class CmmArray.
!    Such arrays must be always used through references, e.g.:
! 
! 	CmmArray<MyClass> & MyVector = * new (100) CmmArray<MyClass>;
  
     Caveats
     -------
***************
*** 699,705 ****
  
  /*---------------------------------------------------------------------------*
   *
!  * -- CmmObject
   *
   *---------------------------------------------------------------------------*/
  
--- 684,690 ----
  
  /*---------------------------------------------------------------------------*
   *
!  * -- CmmObjects
   *
   *---------------------------------------------------------------------------*/
  
***************
*** 758,771 ****
  #endif
  };
  
- /*---------------------------------------------------------------------------*
-  *
-  * -- CmmVarObject
-  *
-  * Collectable objects of variable size.
-  *
-  *---------------------------------------------------------------------------*/
- 
  class CmmVarObject: public CmmObject
  {
  public:
--- 743,748 ----
***************
*** 775,780 ****
--- 752,777 ----
  /*---------------------------------------------------------------------------*
   *
   * -- Arrays of CmmObjects
+  *
+  * Class CmmArray can be used to create arrays of CmmObject's as follows.
+  * To create an array of objects of class Item, overload the new() operator
+  * for class Item:
+  *
+  *	void*
+  *	Item::operator new[](size_t size)
+  *	{
+  *	  return sizeof(size_t) + (char*)new(size) CmmArray<Item>;
+  *	}
+  *
+  * Then you can create and use array of Item normally, for instance:
+  *
+  *	Item* anArrayOfItems = new Item[20];
+  *
+  * The constructor for class Item with no argument will be called for
+  * each Item in the array.
+  *
+  *	anArrayOfItems[i].print();
+  *	Item anItem = anArrayOfItems[3];
   *
   *---------------------------------------------------------------------------*/
  
Common subdirectories: cmm/doc and /project/posso/cmm/cmm/doc
diff -c cmm/msw.cpp /project/posso/cmm/cmm/msw.cpp
*** cmm/msw.cpp	Wed Dec 18 20:45:17 1996
--- /project/posso/cmm/cmm/msw.cpp	Sun Dec 15 21:59:10 1996
***************
*** 1470,1476 ****
  	    assert(*(bp-1) == OpaqueMask ||
  		   *(bp-1) == TransparentMask);
  
! 	    if (*(Byte *)(bp-1) == OpaqueMask)
  	      continue;
  
  	    mswMarkFromTo((GCP)(bp+1),
--- 1470,1476 ----
  	    assert(*(bp-1) == OpaqueMask ||
  		   *(bp-1) == TransparentMask);
  
! 	    if (*(bp-1) == OpaqueMask)
  	      continue;
  
  	    mswMarkFromTo((GCP)(bp+1),
***************
*** 1547,1553 ****
        assert(*(bp-1) == OpaqueMask ||
  	     *(bp-1) == TransparentMask);
  		
!       if (*(Byte *)(bp-1) == OpaqueMask)
  	continue;
  		
        MarkStackPush((GCP)(bp+1));
--- 1547,1553 ----
        assert(*(bp-1) == OpaqueMask ||
  	     *(bp-1) == TransparentMask);
  		
!       if (*(bp-1) == OpaqueMask)
  	continue;
  		
        MarkStackPush((GCP)(bp+1));
***************
*** 2592,2599 ****
  	firstObjOff = FPagesInfo[size].firstObjOffset;
  
  	for (p = page + firstObjOff; p <= hi; p += size1) {
! 	  assert(*(Byte *)(p-1) == TransparentMask
! 		 || *(Byte *)(p-1) == OpaqueMask);
  	  assert(*p == AllocMask || *p == FreeMask);
  	  if (*p == AllocMask)
  	    allocatedObjs += 1;
--- 2592,2598 ----
  	firstObjOff = FPagesInfo[size].firstObjOffset;
  
  	for (p = page + firstObjOff; p <= hi; p += size1) {
! 	  assert(*(p-1) == TransparentMask || *(p-1) == OpaqueMask);
  	  assert(*p == AllocMask || *p == FreeMask);
  	  if (*p == AllocMask)
  	    allocatedObjs += 1;
diff -c cmm/test2.cpp /project/posso/cmm/cmm/test2.cpp
*** cmm/test2.cpp	Tue Dec 17 11:37:30 1996
--- /project/posso/cmm/cmm/test2.cpp	Sun Nov 24 18:52:34 1996
***************
*** 79,84 ****
  	    abort();
  	  }
  	  cl = cl->next;
! 	}
  	return 0;
  }
--- 79,84 ----
  	    abort();
  	  }
  	  cl = cl->next;
! 	}
  	return 0;
  }
diff -c cmm/test3.cpp /project/posso/cmm/cmm/test3.cpp
*** cmm/test3.cpp	Tue Dec 17 11:37:45 1996
--- /project/posso/cmm/cmm/test3.cpp	Sat Nov 23 21:13:48 1996
***************
*** 42,48 ****
  	    0, 1, CMM_GCTHRESHOLD, CMM_FLAGS, 0);
  }
  
! void
  main(int argc, char* argv[])
  {
  	block  *lp = NULL;
--- 42,48 ----
  	    0, 1, CMM_GCTHRESHOLD, CMM_FLAGS, 0);
  }
  
! void
  main(int argc, char* argv[])
  {
  	block  *lp = NULL;
diff -c cmm/test7.cpp /project/posso/cmm/cmm/test7.cpp
*** cmm/test7.cpp	Wed Dec 18 20:56:47 1996
--- /project/posso/cmm/cmm/test7.cpp	Wed Dec 18 13:41:52 1996
***************
*** 9,15 ****
  
  int count = 0;
  
! class Item : public CmmObject
  {
  public:
    Item  *car;
--- 9,15 ----
  
  int count = 0;
  
! class Item : public CmmObject 
  {
  public:
    Item  *car;

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API