Your script does not LOOK too huge... Are you loading some other scripts in addition to this one that might be using up your memory? Maybe you have some stuff in init.lua that is sucking up memory?
The node.heap() function will tell you how much memory is unused/available at any point. It's useful for hunting down things that may be taking up way more memory than you thought they might. Maybe run a few simple experiments similar to this:
ds18b20 = require("ds18b20")
Which will tell you your available memory before and after loading the library.
Another trick to squeeze out a little extra memory is compiling the LUA. node.compile("myscript.lua") will create a "myscript.lc". Then you can dofile("myscript.lc") without your raw script loaded into memory, giving you a little more free memory.
As an aside, notice in my example that i am assigning the result of the require() call to a variable and then using that variable... I believe that's mandatory, so that might be one problem with your script. You'll be trying to call the .setup() method on a ds18b20 object that hasn't been created.