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
  • 557869d
  • /
  • cmm
  • /
  • test4.cpp
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 ...

Permalinks

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
origin badgecontent badge Iframe embedding
swh:1:cnt:dd79eb7e97d81b4fbae07f6f33eb210684eb8ca7
origin badgedirectory badge Iframe embedding
swh:1:dir:d76e0c0d3b7802b5e5ae8a0e397f90e99a04c515
origin badgerevision badge
swh:1:rev:c0f12bb6f3ea8f1350371695b42990a5c2eb93f2
origin badgesnapshot badge
swh:1:snp:4ac4ed834489429d51fc0fd004f10ddbf78d807a
Citations

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
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: c0f12bb6f3ea8f1350371695b42990a5c2eb93f2 authored by Giuseppe Attardi on 02 March 1998, 23:00:00 UTC
1.9 -
Tip revision: c0f12bb
test4.cpp
/* The following program tests the expansion capabilities of the garbage
   collector during collection.
*/

/* Externals */

#include <stdio.h>
#include <stdlib.h>
#include "cmm.h"

/* Define two types of cells, big_cell and little_cell.  Sizes are chosen so
   that one big_cell and one little_cell can be allocated out of the same
   page, but two big_cell's can't be.
*/

struct  big_cell : public CmmObject {
  big_cell  *car;
  big_cell  *cdr;
  int  value;
  int  pad[67];
  big_cell();
  void traverse();
};

void big_cell::traverse()
{
  CmmHeap *heap = Cmm::heap;
  heap->scavenge((CmmObject **)&car);
  heap->scavenge((CmmObject **)&cdr);
}

big_cell::big_cell()
{
	car = cdr = 0;
}

typedef  big_cell* bp;

struct  little_cell : public CmmObject {
  little_cell  *car;
  little_cell  *cdr;
  int  value;
  int  pad[47];
  little_cell();
  void traverse();
};

void little_cell::traverse()
{
  CmmHeap *heap = Cmm::heap;
  heap->scavenge((CmmObject **)&car);
  heap->scavenge((CmmObject **)&cdr);
}

little_cell::little_cell()
{
	car = cdr = 0;
}

typedef  little_cell* lp;

Cmm dummy(CMM_MINHEAP, CMM_MAXHEAP, CMM_INCHEAP, 50, 45,
	  CMM_GCTHRESHOLD, CMM_FLAGS, 0);

void
main()
{
	bp  bl = 0, b1, b2;
	lp  ll = 0, l1, l2;
	int i;

	for  (i = 1; i <= 7000; i++)  {
	  if  (i % 700 == 0)
	    { printf("."); fflush(stdout); }
	  b1 = new big_cell;
	  l1 = new little_cell;
	  b2 = new big_cell;
	  l2 = new little_cell;
	  b1->car = b2;
	  b1->cdr = bl;
	  b1->value = b2->value = i;
	  bl = b1;
	  l1->car = l2;
	  l1->cdr = ll;
	  l1->value = l2->value = i;
	  ll = l1;
	}
	printf("\n");
	for  (i = 7000; i >= 1; i--)  {
	  if  (i % 700 == 0)
	    { printf("."); fflush(stdout); }
	   if  (bl->value != i  ||  ll->value != i)  {
	      fprintf(stderr, "Inconsistent list\n");
	      abort();
	   }
	   bl = bl->cdr;
	   ll = ll->cdr;
	}
	printf("\n");
}

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— Contact— JavaScript license information— Web API

back to top