Skip to content

Instantly share code, notes, and snippets.

View brun0xff's full-sized avatar

brunoathaíde brun0xff

  • Software Engineer
  • Lisbon
View GitHub Profile
//aloca.h
#ifndef ALOCA_H
#define ALOCA_H
#define FIRSTFIT 0
#define BESTFIT 1
#define NEXTFIT 2
#define MAGIC_NUMBER 61616
#include <iostream>
using namespace std;
void setUnsignedShortIntToChar(char * mm, unsigned short n)
{
/*
Pega 8 bits menos significativos de n e coloca nos menos
significativos de low8bits preenchendo os mais significativos
de low8bits com 0000 0000
#include <iostream>
#include "aloca.h"
using namespace std;
meualoc::meualoc(int tamanhoMemoria,int politicaMem)
{
memoria = (char *) malloc(sizeof(char) * tamanhoMemoria);
this->politicaMem = politicaMem;
//aloca.h
#ifndef ALOCA_H
#define ALOCA_H
#define BESTFIT 0
#define FIRSTFIT 1
#define NEXTFIT 2
//TAMANHO MÁXIMO DE ALOCACAO: 65535 (maior unsigned short)
/**
* Bespin: reference implementations of "big data" algorithms
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.edu.ufam.brun0xff</groupId>
<artifactId>projeto1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>projeto1</name>
<!DOCTYPE html>
<!-- Q04-P1 -->
<html>
<head>
<meta charset="utf-8">
<title>Tabela de Multiplicação</title>
<style type="text/css">
#titulo {
text-align: center;
#include <iostream>
using namespace std;
int main()
{
int n, t=1;
while(cin >> n and n)
{
int m[n][4], fim_ant = -1;
#include <iostream>
#define visitado 1
#define nao_visitado 0
#define INFINITO 1111111
typedef struct elem{
int pid;
int ing;
int dur;
int vis;
sudo apt-get -y install open-vm-tools-desktop