Difference between pages "Valgrind" and "DokuWiki"

From Linuxintro
(Difference between pages)
imported>ThorstenStaerk
 
imported>ThorstenStaerk
 
Line 1: Line 1:
With valgrind you can analyze your program's memory behavior.
+
DokuWiki is a [[wiki]] that stores data in plain files and to priviledge distinct users for viewing articles.
  
Example:
+
= Website =
 +
DokuWiki's website is http://www.dokuwiki.org/
  
You write a short program that has a memory leak:
+
= Installing =
<pre>
+
To install dokuwiki, e.g. on SUSE Linux 11.2, you will need a running http service that is php enabled.
#include <iostream>
+
yast -i apache2
using namespace std;
+
yast -i apache2-mod_php5
 +
/etc/init.d/apache2 start
  
void pollute()
+
= Redirect =
{
+
To make what mediawiki calls a redirect, use the goto plugin: http://www.dokuwiki.org/plugin:goto
  int* i=new int();
 
  cout << i << "  ";
 
}
 
  
int main()
+
= Hints =
{
+
 
  { pollute(); }
+
== make it similar to mediawiki ==
}
+
 
</pre>
+
=== template ===
Compile it
+
* [http://www.dokuwiki.org/template:monobook use the monobook template as mediawiki does]
g++ main.cpp
+
* adapt :wiki:navigation to contain
and valgrind it:
+
* <nowiki>[[:start]]</nowiki>
<pre>
+
* [[http://''yourhost''/dokuwiki/doku.php?do=recent|Recent Changes]]
valgrind ./a.out
+
* [[http://''yourhost''/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]]
==21506== Memcheck, a memory error detector
+
 
==21506== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
+
=== syntax ===
==21506== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
+
* install the [http://www.staerk.de/thorsten/index.php/Mediasyntax MediaSyntax plugin]
==21506== Command: ./a.out
 
==21506==
 
0x5936040  ==21506==
 
==21506== HEAP SUMMARY:
 
==21506==    in use at exit: 4 bytes in 1 blocks
 
==21506==  total heap usage: 1 allocs, 0 frees, 4 bytes allocated
 
==21506==
 
==21506== LEAK SUMMARY:
 
==21506==    definitely lost: 4 bytes in 1 blocks
 
==21506==    indirectly lost: 0 bytes in 0 blocks
 
==21506==      possibly lost: 0 bytes in 0 blocks
 
==21506==    still reachable: 0 bytes in 0 blocks
 
==21506==        suppressed: 0 bytes in 0 blocks
 
==21506== Rerun with --leak-check=full to see details of leaked memory
 
==21506==  
 
==21506== For counts of detected and suppressed errors, rerun with: -v
 
==21506== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)
 
</pre>
 

Revision as of 13:46, 17 April 2010

DokuWiki is a wiki that stores data in plain files and to priviledge distinct users for viewing articles.

Website

DokuWiki's website is http://www.dokuwiki.org/

Installing

To install dokuwiki, e.g. on SUSE Linux 11.2, you will need a running http service that is php enabled.

yast -i apache2
yast -i apache2-mod_php5
/etc/init.d/apache2 start

Redirect

To make what mediawiki calls a redirect, use the goto plugin: http://www.dokuwiki.org/plugin:goto

Hints

make it similar to mediawiki

template

* [[:start]]
* [[http://yourhost/dokuwiki/doku.php?do=recent|Recent Changes]]
* [[http://yourhost/dokuwiki/doku.php?id=wiki&do=admin&page=statistics|Statistics]]

syntax