GithubHelp home page GithubHelp logo

ce_os_ex07_hill_ton's Introduction

Hill Ton

Introduction

Have you ever carried a ton of weight up a hill? Well, we hope you don’t, and even if you did - you should probably do it in smaller steps, carefully, knowing what you’re doing..

Up the hill

This time, we do not want to map the file as a whole, but we would like to carry the minimal amount of data for best efficiency, both in allocations and reads. The program you are writing should change the order of the file contents by a first seen first printed manner, while each byte is printed the total amount of times it is shown in the entire file. For example: A file with the contents ZABBBBEAAAAZZDDKEKEKA will be printed as follows ZZZAAAAAABBBBEEEDDKKK The focus here shouldn’t be on the sorting efficiency - but about proper memory management, memory should be reserved when necessary, actual allocations should be performed only when necessary, proper protection and sizes are very relevant. Minimal memory footprint is the goal. The memory shouldn’t be writable by anyone else during the sorting process!

Remarks

  • Only usage of WinAPI is allowed. You can use C-library for input/output only. - Code should be organized, and API should be picked wisely, and used carefully as needed.
  • You can investigate the memory and program state using SysInternals, Task Manager, or printing out statuses during the execution.
  • Please do not use heap APIs - you should manage your own virtual memory!

Your Submission

Please submit the necessary code files, along with an explanation of your choices, examination process and the memory footprint you are expecting. Step by step, you can make it to the top!

References

  • Your previous lesson.
  • MSDN

ce_os_ex07_hill_ton's People

Contributors

xdavidel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.